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

ada: Fix internal error on imported function with post-condition

The problem, which is also present for an expression function, is that the
function is invoked in the initializing expression of a variable declared
in the same declarative part as the function, which causes the freezing of
its artificial body before the post-condition is analyzed on its spec.

gcc/ada/

	* contracts.adb (Analyze_Entry_Or_Subprogram_Body_Contract): For a
	subprogram body that has no contracts and does not come from source,
	make sure that contracts on its corresponding spec are analyzed, if
	any, before expanding them.
parent c0ceba6c
No related branches found
No related tags found
Loading
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