Skip to content
Snippets Groups Projects
Commit 66f2a0de authored by Eric Botcazou's avatar Eric Botcazou Committed by Pierre-Marie de Rodat
Browse files

[Ada] Fix bad interaction between Inline_Always and -gnateV + -gnata

The combination of pragma/aspect Inline_Always and -gnateV -gnata runs
afoul of the handling of inlining across units by gigi, which does not
inline a subprogram that calls nested subprograms if these subprograms
are not themselves inlined.

This condition does not apply to internally generated subprograms but
the special _postconditions procedure has Debug_Info_Needed set so it
is not considered as such and, as a consequence, triggers an error if
the enclosing subprogram requires inlining by means of Inline_Always.

The _postconditions procedure is already marked inlined when generating
C code so it makes sense to mark it inlined in the general case as well.

gcc/ada/

	* contracts.adb (Build_Postconditions_Procedure): Set Is_Inlined
	unconditionnally on the procedure entity.
parent 2ae98c3a
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