[Bug c++/52780] New: ice in create_preheader with -O2

dcb314 at hotmail dot com gcc-bugzilla@gcc.gnu.org
Thu Mar 29 19:39:00 GMT 2012


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

             Bug #: 52780
           Summary: ice in create_preheader with -O2
    Classification: Unclassified
           Product: gcc
           Version: 4.8.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: c++
        AssignedTo: unassigned@gcc.gnu.org
        ReportedBy: dcb314@hotmail.com


I just tried to compile the package tog-pegasus-2.11.1-5
on gcc-4.8 trunk dated 20120328 on an AMD x86_64 box.

The compiler said

NameSpaceManager.cpp: In function ‘void test01()’:
NameSpaceManager.cpp:139:1: internal compiler error: Segmentation fault
Please submit a full bug report,
with preprocessed source if appropriate.
See <http://gcc.gnu.org/bugs.html> for instructions.

Here is a valgrind dump

==24018== Invalid read of size 4
==24018==    at 0x7D9787: create_preheader(loop*, int) (cfgloopmanip.c:1391)
==24018==    by 0x7D9AFD: create_preheaders(int) (cfgloopmanip.c:1443)
==24018==    by 0x9FBD0E: loop_optimizer_init(unsigned int) (loop-init.c:89)
==24018==    by 0x9FBDEE: rtl_loop_init() (loop-init.c:201)
==24018==    by 0xA5408C: execute_one_pass(opt_pass*) (passes.c:2079)
==24018==    by 0xA54606: execute_pass_list(opt_pass*) (passes.c:2134)
==24018==    by 0xB935CD: tree_rest_of_compilation(tree_node*)
(tree-optimize.c:422)
==24018==    by 0x7ECFDD: cgraph_expand_function(cgraph_node*)
(cgraphunit.c:1837)
==24018==    by 0x7F0D8B: cgraph_optimize() (cgraphunit.c:1904)
==24018==    by 0x7F1439: cgraph_finalize_compilation_unit()
(cgraphunit.c:1344)
==24018==    by 0x5F49FA: cp_write_global_declarations() (decl2.c:4077)
==24018==    by 0xB19929: toplev_main(int, char**) (toplev.c:572)
==24018==  Address 0x30 is not stack'd, malloc'd or (recently) free'd
==24018==

Preprocessed source code attached. Flag -O2 required.



More information about the Gcc-bugs mailing list