+++ This bug was initially created as a clone of Bug #43314 +++

Command line:
gcc -O1 -fipa-struct-reorg -fwhole-program -fipa-type-escape -g testcase.c

Tested revisions:
r157326 - crash
r157292 - crash
r156999 - crash
r156745 - OK
r153685 - OK
4.4 r157120 - OK

Output - trunk:
$ /mnt/svn/gcc-trunk/binary-157326-lto/bin/gcc -O1 -fipa-struct-reorg
-fwhole-program -fipa-type-escape -g testcase.c 
testcase.c: In function 'main':
testcase.c:12:1: internal compiler error: Segmentation fault

Valgrind:
==25577== Invalid read of size 2
==25577==    at 0x8062DF: prepare_block_for_update (tree-into-ssa.c:2550)
==25577==    by 0x8063DA: prepare_block_for_update (tree-into-ssa.c:2568)
==25577==    by 0x80B4EA: update_ssa (tree-into-ssa.c:3317)
==25577==    by 0x9BA883: reorg_structs_drive (ipa-struct-reorg.c:3241)
==25577==    by 0x72596A: execute_one_pass (passes.c:1567)
==25577==    by 0x725DE9: execute_ipa_pass_list (passes.c:1801)
==25577==    by 0x9A181E: cgraph_optimize (cgraphunit.c:1795)
==25577==    by 0x9A1FE4: cgraph_finalize_compilation_unit (cgraphunit.c:1093)
==25577==    by 0x4B0572: c_write_global_declarations (c-decl.c:9510)
==25577==    by 0x7CAA9F: toplev_main (toplev.c:1065)
==25577==    by 0x658DBBC: (below main) (in /lib64/libc-2.11.so)
==25577==  Address 0x0 is not stack'd, malloc'd or (recently) free'd

This could be related to pr43084.


-- 
           Summary: [4.5 Regression] ICE: Segmentation fault with -fipa-
                    struct-reorg -g
           Product: gcc
           Version: 4.5.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: tree-optimization
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: zsojka at seznam dot cz


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

Reply via email to