http://gcc.gnu.org/bugzilla/show_bug.cgi?id=53550
Bug #: 53550 Summary: [4.6/4.7/4.8 regression] ICE with -O{1,2,3} -fprefetch-loop-arrays in build2_stat, at tree.c:3803 Classification: Unclassified Product: gcc Version: unknown Status: UNCONFIRMED Severity: normal Priority: P3 Component: tree-optimization AssignedTo: unassig...@gcc.gnu.org ReportedBy: xarthisius...@gmail.com Created attachment 27538 --> http://gcc.gnu.org/bugzilla/attachment.cgi?id=27538 reduced testcase Starting program: /dev/shm/portage/sys-devel/gcc-4.6.3/work/build/gcc/cc1 -O2 -fprefetch-loop-arrays /ice_416991.i wctomb mbstowcs luma_render /ice_416991.i: In function 'luma_render': /ice_416991.i:28:20: warning: incompatible implicit declaration of built-in function 'malloc' [enabled by default] Analyzing compilation unit Performing interprocedural optimizations <*free_lang_data> <visibility> <early_local_cleanups> <whole-program> <ipa-profile> <cp> <inline> <pure-const> <static-var>Assembling functions: wctomb mbstowcs luma_render Breakpoint 1, 0x00000000005ba3e4 in fancy_abort () (gdb) bt #0 0x00000000005ba3e4 in fancy_abort () #1 0x00000000009bf92b in build2_stat () #2 0x000000000064370e in build2_stat_loc () #3 0x000000000067967c in fold_build2_stat_loc () #4 0x000000000091022c in determine_exit_conditions () #5 0x0000000000910549 in tree_transform_and_unroll_loop () #6 0x000000000091107c in tree_unroll_loop () #7 0x0000000000ddfc64 in loop_prefetch_arrays () #8 0x0000000000ddffc5 in tree_ssa_prefetch_arrays () #9 0x000000000091a47d in tree_ssa_loop_prefetch () #10 0x0000000000759059 in execute_one_pass () #11 0x0000000000759233 in execute_pass_list () #12 0x0000000000759254 in execute_pass_list () #13 0x0000000000759254 in execute_pass_list () #14 0x000000000088eae1 in tree_rest_of_compilation () #15 0x0000000000a49d0b in cgraph_expand_function () #16 0x0000000000a49eca in cgraph_expand_all_functions () #17 0x0000000000a4a533 in cgraph_optimize () #18 0x0000000000a48b22 in cgraph_finalize_compilation_unit () #19 0x000000000049de30 in c_write_global_declarations () #20 0x000000000083006e in compile_file () #21 0x0000000000832000 in do_compile () #22 0x0000000000832146 in toplev_main () #23 0x0000000000521118 in main () Downstream bug: https://bugs.gentoo.org/show_bug.cgi?id=416991 I've checked that it also fails with gcc-4.4.6, however it works fine with gcc-4.5.3.