This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug rtl-optimization/17027] [3.4 Regression] ICE with switch in while (-mcpu=v9 -O2)


------- Additional Comments From ehrhardt at mathematik dot uni-ulm dot de  2004-08-17 09:08 -------
I can confirm this on sparc-sun-solaris2.9. It requires -mcpu=v9
though which is interesting because the crash seems to happen in
apparently arch independant code (see backtrace below):

I use the following cleaned up testcase:

/* Compile with -O2 -mcpu=v9 */
int bar(void);
void baz (void)  __attribute__ ((noreturn)); /* noreturn is required */
int foo;

void f (void) 
{
        while (bar ()) {
                switch (1) {
                        default:
                        baz ();
                }
        }
}   


Program received signal SIGSEGV, Segmentation fault.
0x000a8928 in cfg_layout_finalize () at /home/thales/ehrhardt/gcc-3.4-cvs/gcc/gcc/cfglayout.c:869
869             c = c->rbi->next;
(gdb) bt
#0  0x000a8928 in cfg_layout_finalize () at /home/thales/ehrhardt/gcc-3.4-cvs/gcc/gcc/cfglayout.c:869
#1  0x002b268c in reorder_basic_blocks (flags=100) at /home/thales/ehrhardt/gcc-3.4-cvs/gcc/gcc/bb-reorder.c:1115
#2  0x00267c70 in rest_of_compilation (decl=0xff172500) at /home/thales/ehrhardt/gcc-3.4-cvs/gcc/gcc/toplev.c:2332
#3  0x002abcf8 in tree_rest_of_compilation (fndecl=0xff172500, nested_p=false) at /home/thales/ehrhardt/gcc-3.4-cvs/gcc/gcc/tree-optimize.c:168
#4  0x00031c18 in c_expand_body_1 (fndecl=0xff172500, nested_p=0) at /home/thales/ehrhardt/gcc-3.4-cvs/gcc/gcc/c-decl.c:6158
#5  0x002add28 in cgraph_expand_function (node=0xff172980) at /home/thales/ehrhardt/gcc-3.4-cvs/gcc/gcc/cgraphunit.c:538
#6  0x002afc70 in cgraph_optimize () at /home/thales/ehrhardt/gcc-3.4-cvs/gcc/gcc/cgraphunit.c:1542
#7  0x0006d310 in c_objc_common_finish_file () at /home/thales/ehrhardt/gcc-3.4-cvs/gcc/gcc/c-objc-common.c:245
#8  0x0026932c in toplev_main (argc=3845120, argv=0x3ab000) at /home/thales/ehrhardt/gcc-3.4-cvs/gcc/gcc/toplev.c





-- 
           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |NEW
     Ever Confirmed|                            |1
   Last reconfirmed|0000-00-00 00:00:00         |2004-08-17 09:08:58
               date|                            |
            Summary|[3.4 Regression] ICE with   |[3.4 Regression] ICE with
                   |switch in while             |switch in while (-mcpu=v9 -
                   |                            |O2)


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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]