------- Comment #3 from joel at gcc dot gnu dot org 2009-09-20 15:56 ------- The debug information is weak since optimization hides a lot. But it looks like Page_Size might be 0.
(gdb) c Continuing. ,.,. A85013B ACATS 2.5 88-01-01 00:00:00 ---- A85013B CHECK THAT A SUBPROGRAM CAN BE RENAMED WITHIN ITS OWN BODY AND THAT THE NEW NAME CAN BE USED IN A RENAMING DECLARATION. Breakpoint 3, pthread_attr_init (attr=0x880b6c78) at /users/joel/test-gcc/rtems/c/src/../../cpukit/posix/src/pthreadattrinit.c:28 28 if ( !attr ) (gdb) s 31 *attr = _POSIX_Threads_Default_attributes; (gdb) 32 return 0; (gdb) system.task_primitives.operations.create_task (t=0x881a2e90, wrapper=(system.address) 0x8800c7c8, stack_size=<value optimized out>, priority=122) at s-taprop.adb:967 967 if Result /= 0 then Current language: auto The current source language is "auto; currently ada". (gdb) p Result $1 = <value optimized out> (gdb) s 960 Adjusted_Stack_Size := Adjusted_Stack_Size + Page_Size - 1; (gdb) p Adjusted_Stack_Size $2 = <value optimized out> (gdb) s 974 (Attributes'Access, PTHREAD_CREATE_DETACHED); (gdb) s pthread_attr_setdetachstate (attr=0x880b6c78, detachstate=0) at /users/joel/test-gcc/rtems/c/src/../../cpukit/posix/src/pthreadattrsetdetachstate.c:26 26 if ( !attr || !attr->is_initialized ) Current language: auto The current source language is "auto; currently c". (gdb) s 29 switch ( detachstate ) { (gdb) 32 attr->detachstate = detachstate; (gdb) 33 return 0; (gdb) system.task_primitives.operations.create_task (t=0x881a2e90, wrapper=(system.address) 0x8800c7c8, stack_size=<value optimized out>, priority=122) at s-taprop.adb:962 962 Adjusted_Stack_Size - Adjusted_Stack_Size mod Page_Size; Current language: auto The current source language is "auto; currently ada". (gdb) -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=41419