This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Ada: fix ICE with incorrect subunit and -gnatc


Tested on x86-linux

Fix ICE with incorrect subunit and -gnatc:

package Pkg is
  procedure Dummy;
end Pkg;
package body Pkg is
   package Sep is end Sep;
   package body Sep is separate;
   procedure Dummy is begin null; end;
end Pkg;

$ cat << EOF > pkg-sep.adb
separate (Pkg)
procedure Toto is
begin
   null;
end;
EOF

$ gcc -c -gnatc pkg.adb

2004-10-26  Ed Schonberg  <schonberg@gnat.com>

	* sem_ch6.adb (Analyze_Subprogram_Body): If body is a subunit for a
	different kind of stub (possibly wrong name for file), do not check
	for conformance.
	(Uses_Secondary_Stack): New subsidiary to Build_Body_To_Inline. If body
	includes call to some function that returns an unconstrained type, do
	not inline.

Attachment: difs.30
Description: Text document


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]