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

             Bug #: 51363
           Summary: [4.7 Regression] ICE: in gimple_rhs_has_side_effects,
                    at gimple.c:2530 with -O -fno-tree-ccp
    Classification: Unclassified
           Product: gcc
           Version: 4.7.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: tree-optimization
        AssignedTo: unassig...@gcc.gnu.org
        ReportedBy: zso...@seznam.cz
              Host: x86_64-pc-linux-gnu
            Target: x86_64-pc-linux-gnu


Created attachment 25958
  --> http://gcc.gnu.org/bugzilla/attachment.cgi?id=25958
reduced testcase

Compiler output:
$ gcc -O -fno-tree-ccp testcase.c 
testcase.c: In function 'foo':
testcase.c:6:12: warning: initialization discards 'volatile' qualifier from
pointer target type [enabled by default]
testcase.c:4:1: internal compiler error: in gimple_rhs_has_side_effects, at
gimple.c:2530
Please submit a full bug report,
with preprocessed source if appropriate.
See <http://gcc.gnu.org/bugs.html> for instructions.

(gdb) bt
#0  fancy_abort (file=0x1264f08 "/mnt/svn/gcc-trunk/gcc/gimple.c", line=2530,
function=0x1267980 "gimple_rhs_has_side_effects")
    at /mnt/svn/gcc-trunk/gcc/diagnostic.c:898
#1  0x000000000080cd01 in gimple_rhs_has_side_effects (s=0x7ffff56b3280) at
/mnt/svn/gcc-trunk/gcc/gimple.c:2530
#2  0x0000000000aba3f6 in optimize_stmt (walk_data=Unhandled dwarf expression
opcode 0xf3
) at /mnt/svn/gcc-trunk/gcc/tree-ssa-dom.c:2159
#3  dom_opt_enter_block (walk_data=Unhandled dwarf expression opcode 0xf3
) at /mnt/svn/gcc-trunk/gcc/tree-ssa-dom.c:1692
#4  0x00000000010d4c3a in walk_dominator_tree (walk_data=0x7fffffffd840,
bb=0x7ffff56951a0) at /mnt/svn/gcc-trunk/gcc/domwalk.c:188
#5  0x0000000000ab8e44 in tree_ssa_dominator_optimize () at
/mnt/svn/gcc-trunk/gcc/tree-ssa-dom.c:709
#6  0x00000000008fa7e5 in execute_one_pass (pass=0x17bf200) at
/mnt/svn/gcc-trunk/gcc/passes.c:2074
#7  0x00000000008fab85 in execute_pass_list (pass=0x17bf200) at
/mnt/svn/gcc-trunk/gcc/passes.c:2129
#8  0x00000000008fab97 in execute_pass_list (pass=0x17becc0) at
/mnt/svn/gcc-trunk/gcc/passes.c:2130
#9  0x0000000000a5c2ee in tree_rest_of_compilation (fndecl=0x7ffff5697b00) at
/mnt/svn/gcc-trunk/gcc/tree-optimize.c:421
#10 0x00000000006af97a in cgraph_expand_function (node=0x7ffff55886c0) at
/mnt/svn/gcc-trunk/gcc/cgraphunit.c:1819
#11 0x00000000006b171c in cgraph_expand_all_functions () at
/mnt/svn/gcc-trunk/gcc/cgraphunit.c:1886
#12 cgraph_optimize () at /mnt/svn/gcc-trunk/gcc/cgraphunit.c:2199
#13 0x00000000006b1e8a in cgraph_finalize_compilation_unit () at
/mnt/svn/gcc-trunk/gcc/cgraphunit.c:1327
#14 0x000000000058f970 in c_write_global_declarations () at
/mnt/svn/gcc-trunk/gcc/c-decl.c:10026
#15 0x00000000009efa94 in compile_file (argc=14, argv=0x7fffffffdae8) at
/mnt/svn/gcc-trunk/gcc/toplev.c:581
#16 do_compile (argc=14, argv=0x7fffffffdae8) at
/mnt/svn/gcc-trunk/gcc/toplev.c:1936
#17 toplev_main (argc=14, argv=0x7fffffffdae8) at
/mnt/svn/gcc-trunk/gcc/toplev.c:2012
#18 0x00007ffff6178d2d in __libc_start_main () from /lib64/libc.so.6
#19 0x00000000005731a9 in _start ()

Tested revisions:
r181788 - crash

Reply via email to