This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug ada/35284] Branch to 0x0 from Ada run-time
- From: "laurent at guerby dot net" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 21 Feb 2008 22:32:59 -0000
- Subject: [Bug ada/35284] Branch to 0x0 from Ada run-time
- References: <bug-35284-296@http.gcc.gnu.org/bugzilla/>
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
------- Comment #3 from laurent at guerby dot net 2008-02-21 22:32 -------
The great majority of FAIL are tests with an Ada task so my guess is that
tasking is broken.
I'm not a specialist but GNAT soft links are pointers to function which are set
by the elaboration code to point to tasking or non-tasking version of several
runtime primitives, these are in s-soflin.ads.
May be what you see is that elaboration for s-soflin.ads is not done at the
right time during elaboration so all pointers end up null hence the jump to
null. Might be a binder problem.
Could you try the following small tasking program:
-- begin t.adb
with GNAT.IO; use GNAT.IO;
procedure T is
task A;
task body A is
begin
Put_Line ("A");
end A;
begin
Put_Line ("T");
end T;
-- end t.adb
When I compile it on i386 native with gnatmake -g t.adb I see in the binder
generated b~t.adb :
System.Restrictions'Elab_Spec;
System.Restrictions'Elab_Body;
E076 := True;
Ada.Exceptions'Elab_Spec;
System.Soft_Links'Elab_Body;
E011 := True;
System.Secondary_Stack'Elab_Body;
E013 := True;
System.Exception_Table'Elab_Body;
E022 := True;
Ada.Io_Exceptions'Elab_Spec;
E082 := True;
Ada.Tags'Elab_Spec;
Ada.Tags'Elab_Body;
E074 := True;
Ada.Streams'Elab_Spec;
E077 := True;
Interfaces.C'Elab_Spec;
E041 := True;
System.Finalization_Root'Elab_Spec;
E079 := True;
System.Tasking.Initialization'Elab_Body;
E084 := True;
System.Tasking.Protected_Objects'Elab_Body;
E090 := True;
E018 := True;
System.Finalization_Implementation'Elab_Spec;
System.Finalization_Implementation'Elab_Body;
E072 := True;
Ada.Finalization'Elab_Spec;
E096 := True;
Ada.Finalization.List_Controller'Elab_Spec;
E098 := True;
System.Tasking.Protected_Objects.Entries'Elab_Spec;
E094 := True;
System.Tasking.Queuing'Elab_Body;
E088 := True;
System.Tasking.Stages'Elab_Body;
E068 := True;
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=35284