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: 1 Apr 2008 19:40:26 -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 #25 from laurent at guerby dot net 2008-04-01 19:40 -------
The binder will generate a call to Set_Globals
pragma Import (C, Set_Globals, "__gnat_set_globals");
Set_Globals
(Main_Priority => -1,
Time_Slice_Value => -1,
WC_Encoding => 'b',
Locking_Policy => ' ',
Queuing_Policy => ' ',
Task_Dispatching_Policy => ' ',
Restrictions => Restrictions'Address,
Interrupt_States => Interrupt_States'Address,
Num_Interrupt_States => 0,
Unreserve_All_Interrupts => 0,
Exception_Tracebacks => 0,
Zero_Cost_Exceptions => 1,
Detect_Blocking => 0);
That should set the following global in s-taskin.adb:
Main_Priority : Integer;
pragma Import (C, Main_Priority, "__gl_main_priority");
-- Priority for main task. Note that this is of type Integer, not
-- Priority, because we use the value -1 to indicate the default
-- main priority, and that is of course not in Priority'range.
Which is checked in System.tasking.initialize
-- Initialize Environment Task
if Main_Priority = Unspecified_Priority then
Base_Priority := Default_Priority;
else
Base_Priority := Priority (Main_Priority);
end if;
Default_Priority is defined in system-rtems.ads :
Default_Priority : constant Priority := 122;
so my advice is breakpoint on the if above and see what happens. double check
that you compile using the right system.ads.
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=35284