[Bug target/34587] gcc.dg/initpri1.c fails on *-apple-darwin

2009-02-17 Thread howarth at nitro dot med dot uc dot edu


--- Comment #18 from howarth at nitro dot med dot uc dot edu  2009-02-18 
02:49 ---
Fixed in current gcc trunk.


-- 

howarth at nitro dot med dot uc dot edu changed:

   What|Removed |Added

 Status|NEW |RESOLVED
 Resolution||FIXED


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=34587



[Bug target/34587] gcc.dg/initpri1.c fails on *-apple-darwin

2009-02-17 Thread danglin at gcc dot gnu dot org


--- Comment #17 from danglin at gcc dot gnu dot org  2009-02-18 00:31 
---
*** Bug 38441 has been marked as a duplicate of this bug. ***


-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=34587



[Bug target/34587] gcc.dg/initpri1.c fails on *-apple-darwin

2009-02-17 Thread danglin at gcc dot gnu dot org


--- Comment #16 from danglin at gcc dot gnu dot org  2009-02-17 23:50 
---
Fixed on trunk.


-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=34587



[Bug target/34587] gcc.dg/initpri1.c fails on *-apple-darwin

2009-02-17 Thread danglin at gcc dot gnu dot org


--- Comment #15 from danglin at gcc dot gnu dot org  2009-02-17 23:43 
---
Subject: Bug 34587

Author: danglin
Date: Tue Feb 17 23:42:44 2009
New Revision: 144251

URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=144251
Log:
PR target/34587
* config/darwin.h (SUPPORTS_INIT_PRIORITY): Define.


Modified:
trunk/gcc/ChangeLog
trunk/gcc/config/darwin.h


-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=34587



[Bug target/34587] gcc.dg/initpri1.c fails on *-apple-darwin

2009-02-17 Thread dave at hiauly1 dot hia dot nrc dot ca


--- Comment #14 from dave at hiauly1 dot hia dot nrc dot ca  2009-02-17 
19:49 ---
Subject: Re:  gcc.dg/initpri1.c fails on *-apple-darwin

> John,
> Doesn't this also fix g++.dg/special/conpr-3.C as well? Are you planning 
> to
> submit this to gcc-patches so we can get it into gcc 4.4 before the branch?

I'll know when I get home.  Ran a full build and check with the change
last night.  There might be some testsuite issues.

Dave


-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=34587



[Bug target/34587] gcc.dg/initpri1.c fails on *-apple-darwin

2009-02-17 Thread mrs at apple dot com


--- Comment #13 from mrs at apple dot com  2009-02-17 19:18 ---
Ok to add that to darwin.h.


-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=34587



[Bug target/34587] gcc.dg/initpri1.c fails on *-apple-darwin

2009-02-17 Thread howarth at nitro dot med dot uc dot edu


--- Comment #12 from howarth at nitro dot med dot uc dot edu  2009-02-17 
17:36 ---
John,
Doesn't this also fix g++.dg/special/conpr-3.C as well? Are you planning to
submit this to gcc-patches so we can get it into gcc 4.4 before the branch?


-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=34587



[Bug target/34587] gcc.dg/initpri1.c fails on *-apple-darwin

2009-02-16 Thread danglin at gcc dot gnu dot org


--- Comment #11 from danglin at gcc dot gnu dot org  2009-02-17 01:37 
---
It is a limitation of the Apple assembler and linker.  From the Apple assembler
manual:

.mod_init_func
This is equivalent to .section __DATA, __mod_init_func, mod_init_funcs
This section is of type mod_init_funcs and has no attributes. The C++ compiler
places a pointer to a
function in this section for each function it creates to call the constructors
(if the module has them).

.mod_term_func
This is equivalent to .section __DATA, __mod_term_func, mod_term_funcs
This section is of type mod_term_funcs and has no attributes. The C++ compiler
places a pointer to a
function in this section for each function it creates to call the destructors
(if the module has them).

These directives don't allow for a priority.

It might be possible to sort constructors/destructors with collect2, but for
now it as if something like the following

/* The Apple linker does not support constructor priorities.  */
#undef SUPPORTS_INIT_PRIORITY
#define SUPPORTS_INIT_PRIORITY 0

should be added to darwin.h.


-- 

danglin at gcc dot gnu dot org changed:

   What|Removed |Added

 CC||danglin at gcc dot gnu dot
   ||org


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=34587



[Bug target/34587] gcc.dg/initpri1.c fails on *-apple-darwin

2008-12-07 Thread danglin at gcc dot gnu dot org


--- Comment #10 from danglin at gcc dot gnu dot org  2008-12-07 21:18 
---
g++.dg/special/initpri1.C also aborts in the same way:

Starting program: /Users/dave/gnu/gcc/objdir/gcc/testsuite/g++/initpri1.xg 
Reading symbols for shared libraries +++. done

Program received signal SIGABRT, Aborted.
0x90b74b9e in __kill ()
(gdb) bt
#0  0x90b74b9e in __kill ()
#1  0x90b74b91 in kill$UNIX2003 ()
#2  0x90bebec2 in raise ()
#3  0x90bfb47f in abort ()
#4  0x1d07 in c2 ()
#5  0x8fe12e76 in
__dyld__ZN16ImageLoaderMachO18doModInitFunctionsERKN11ImageLoader11LinkContextE
()
#6  0x8fe0e723 in
__dyld__ZN11ImageLoader23recursiveInitializationERKNS_11LinkContextEj ()
#7  0x8fe0e809 in __dyld__ZN11ImageLoader15runInitializersERKNS_11LinkContextE
()
#8  0x8fe04102 in __dyld__ZN4dyld24initializeMainExecutableEv ()
#9  0x8fe07b5f in __dyld__ZN4dyld5_mainEPK11mach_headermiPPKcS5_S5_ ()
#10 0x8fe01872 in __dyld__ZN13dyldbootstrap5startEPK11mach_headeriPPKcl ()
#11 0x8fe01037 in __dyld__dyld_start ()


-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=34587



[Bug target/34587] gcc.dg/initpri1.c fails on *-apple-darwin

2008-11-22 Thread howarth at nitro dot med dot uc dot edu


--- Comment #9 from howarth at nitro dot med dot uc dot edu  2008-11-23 
04:47 ---
I am mainly trying to determine if this is a flaw in darwin linker or assembler
rather than a bug in gcc. If the former, we can at least file a radar bug
report with Apple.


-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=34587



[Bug target/34587] gcc.dg/initpri1.c fails on *-apple-darwin

2008-11-22 Thread howarth at nitro dot med dot uc dot edu


--- Comment #8 from howarth at nitro dot med dot uc dot edu  2008-11-23 
04:43 ---
This backtraces on i686 darwin as...

jack-howarths-macbook-pro-17:temp6 howarth$ gcc-4  -g -ansi -pedantic-errors
-lm -m32 initpri1.c
jack-howarths-macbook-pro-17:temp6 howarth$ gdb ./a.out
GNU gdb 6.3.50-20050815 (Apple version gdb-1309) (Fri Oct 10 03:38:53 UTC 2008)
Copyright 2004 Free Software Foundation, Inc.
GDB is free software, covered by the GNU General Public License, and you are
welcome to change it and/or distribute copies of it under certain conditions.
Type "show copying" to see the conditions.
There is absolutely no warranty for GDB.  Type "show warranty" for details.
This GDB was configured as "x86_64-apple-darwin"...Reading symbols for shared
libraries ... done

(gdb) r
Starting program: /Users/howarth/temp6/a.out 
Reading symbols for shared libraries ++. done

Program received signal SIGABRT, Aborted.
0x981d8ffe in __kill ()
(gdb) bt
#0  0x981d8ffe in __kill ()
#1  0x981d8ff1 in kill$UNIX2003 ()
#2  0x9824d39f in raise ()
#3  0x9825f190 in abort ()
#4  0x1dc1 in c2 () at initpri1.c:19
#5  0x8fe146d8 in
__dyld__ZN16ImageLoaderMachO16doInitializationERKN11ImageLoader11LinkContextE
()
#6  0x8fe0ec6d in
__dyld__ZN11ImageLoader23recursiveInitializationERKNS_11LinkContextEj ()
#7  0x8fe0ed59 in __dyld__ZN11ImageLoader15runInitializersERKNS_11LinkContextE
()
#8  0x8fe052e2 in __dyld__ZN4dyld24initializeMainExecutableEv ()
#9  0x8fe083e9 in __dyld__ZN4dyld5_mainEPK11mach_headermiPPKcS5_S5_ ()
#10 0x8fe01960 in __dyld__ZN13dyldbootstrap5startEPK11mach_headeriPPKcl ()
#11 0x8fe01057 in __dyld__dyld_start ()
(gdb) 


-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=34587