If you compile the following code (cut down from crtstuff.c) with -mcmodel=large -fPIC -O2 on a 64 bit x86 target GCC will ICE. There are at least two problems, one in cselib_hash_rtx, and if that is fixed then I get a shared rtx abort.
The test case is typedef long unsigned int size_t; typedef void (*func_ptr) (void); static func_ptr __DTOR_LIST__[1] = { (func_ptr) (-1) }; static void __attribute__((used)) __do_global_dtors_aux (void) { extern func_ptr __DTOR_END__[]; size_t dtor_idx = 0; const size_t max_idx = __DTOR_END__ - __DTOR_LIST__ - 1; func_ptr f; while (dtor_idx < max_idx) { f = __DTOR_LIST__[++dtor_idx]; f (); } } -- Summary: Cannot build crtstuff.c with -mcmodel=large -fPIC -O2 Product: gcc Version: 4.4.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: target AssignedTo: unassigned at gcc dot gnu dot org ReportedBy: sje at cup dot hp dot com GCC target triplet: x86_64-*-* http://gcc.gnu.org/bugzilla/show_bug.cgi?id=38988