Skip to content
Snippets Groups Projects
Commit 3d3930f5 authored by Eric Botcazou's avatar Eric Botcazou Committed by Marc Poulhiès
Browse files

ada: Fix double finalization of case expression in concatenation

This streamlines the expansion of case expressions by not wrapping them in
an Expression_With_Actions node when the type is not by copy, which avoids
the creation of a temporary and the associated finalization issues.

That's the same strategy as the one used for the expansion of if expressions
when the type is by reference, unless Back_End_Handles_Limited_Types is set
to True. Given that it is never set to True, except by a debug switch, and
has never been implemented, this parameter is removed in the process.

gcc/ada/

	* debug.adb (d.L): Remove documentation.
	* exp_ch4.adb (Expand_N_Case_Expression): In the not-by-copy case,
	do not wrap the case statement in an Expression_With_Actions node.
	(Expand_N_If_Expression): Do not test
	Back_End_Handles_Limited_Types
	* gnat1drv.adb (Adjust_Global_Switches): Do not set it.
	* opt.ads (Back_End_Handles_Limited_Types): Delete.
parent d47dbbd2
No related branches found
No related tags found
No related merge requests found
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment