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 tree-optimization/66449] New: [6 Regression] ICE: in build2_stat, at tree.c:4376 with -O3


https://gcc.gnu.org/bugzilla/show_bug.cgi?id=66449

            Bug ID: 66449
           Summary: [6 Regression] ICE: in build2_stat, at tree.c:4376
                    with -O3
           Product: gcc
           Version: 6.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: tree-optimization
          Assignee: unassigned at gcc dot gnu.org
          Reporter: dimhen at gmail dot com
  Target Milestone: ---

r223920 PASS
r224193 FAIL

gcc -fpreprocessed -Werror -Wall -O2 -c x.i PASS
gcc -fpreprocessed -Werror -Wall -O3 -c x.i FAIL

$ cat x.i
void *fn1(void *p1, void *p2, long p3) {
  long a = (long)p1, b = (long)p2, c = p3;
  while (c) {
    int d = ((int *)b)[0];
    c--;
    ((char *)a)[0] = d;
    a++;
  }
  return 0;
}


$ /usr/local/gcc_current/bin/gcc -v
Using built-in specs.
COLLECT_GCC=/usr/local/gcc_current/bin/gcc
COLLECT_LTO_WRAPPER=/usr/local/gcc_current/libexec/gcc/x86_64-unknown-linux-gnu/6.0.0/lto-wrapper
Target: x86_64-unknown-linux-gnu
Configured with: /home/dimhen/src/gcc_current/configure
--prefix=/usr/local/gcc_current --enable-static
--enable-checking=yes,df,fold,rtl --enable-languages=c,c++,lto --enable-plugin
--disable-libstdcxx-dual-abi --disable-multilib
Thread model: posix
gcc version 6.0.0 20150606 (experimental) [trunk revision 224193] (GCC)



$ /usr/local/gcc_current/bin/gcc -fpreprocessed -Werror -Wall -O3 -c x.i
x.i: In function âfn1â:
x.i:1:7: internal compiler error: in build2_stat, at tree.c:4376
 void *fn1(void *p1, void *p2, long p3) {
       ^
0xe180cd build2_stat(tree_code, tree_node*, tree_node*, tree_node*)
        /home/dimhen/src/gcc_current/gcc/tree.c:4375
0x862c78 build2_stat_loc
        /home/dimhen/src/gcc_current/gcc/tree.h:3702
0x862c78 fold_build2_stat_loc(unsigned int, tree_code, tree_node*, tree_node*,
tree_node*)
        /home/dimhen/src/gcc_current/gcc/fold-const.c:14281
0xd05015 loop_exits_before_overflow
        /home/dimhen/src/gcc_current/gcc/tree-ssa-loop-niter.c:3900
0xd05015 scev_probably_wraps_p(tree_node*, tree_node*, gimple_statement_base*,
loop*, bool)
        /home/dimhen/src/gcc_current/gcc/tree-ssa-loop-niter.c:4031
0x13d3108 convert_affine_scev(loop*, tree_node*, tree_node**, tree_node**,
gimple_statement_base*, bool)
        /home/dimhen/src/gcc_current/gcc/tree-chrec.c:1275
0x13d3510 chrec_convert_1
        /home/dimhen/src/gcc_current/gcc/tree-chrec.c:1330
0xc7e6c8 interpret_rhs_expr
        /home/dimhen/src/gcc_current/gcc/tree-scalar-evolution.c:1886
0xc7acca interpret_gimple_assign
        /home/dimhen/src/gcc_current/gcc/tree-scalar-evolution.c:1928
0xc7acca analyze_scalar_evolution_1
        /home/dimhen/src/gcc_current/gcc/tree-scalar-evolution.c:2010
0xc7b737 analyze_scalar_evolution(loop*, tree_node*)
        /home/dimhen/src/gcc_current/gcc/tree-scalar-evolution.c:2065
0xc7f12a analyze_scalar_evolution_in_loop
        /home/dimhen/src/gcc_current/gcc/tree-scalar-evolution.c:2161
0xc7f26f simple_iv(loop*, loop*, tree_node*, affine_iv*, bool)
        /home/dimhen/src/gcc_current/gcc/tree-scalar-evolution.c:3269
0x13dc669 dr_analyze_innermost(data_reference*, loop*)
        /home/dimhen/src/gcc_current/gcc/tree-data-ref.c:829
0x13e1742 create_data_ref(loop*, loop*, tree_node*, gimple_statement_base*,
bool)
        /home/dimhen/src/gcc_current/gcc/tree-data-ref.c:1100
0x13e261c find_data_references_in_stmt(loop*, gimple_statement_base*,
vec<data_reference*, va_heap, vl_ptr>*)
        /home/dimhen/src/gcc_current/gcc/tree-data-ref.c:4532
0x13e27ea find_data_references_in_bb(loop*, basic_block_def*,
vec<data_reference*, va_heap, vl_ptr>*)
        /home/dimhen/src/gcc_current/gcc/tree-data-ref.c:4585
0x13e2a10 find_data_references_in_loop(loop*, vec<data_reference*, va_heap,
vl_ptr>*)
        /home/dimhen/src/gcc_current/gcc/tree-data-ref.c:4618
0x13e3b4a compute_data_dependences_for_loop(loop*, bool, vec<loop*, va_heap,
vl_ptr>*, vec<data_reference*, va_heap, vl_ptr>*,
vec<data_dependence_relation*, va_heap, vl_ptr>*)
        /home/dimhen/src/gcc_current/gcc/tree-data-ref.c:4694
0xc65565 tree_predictive_commoning_loop
        /home/dimhen/src/gcc_current/gcc/tree-predcom.c:2486
Please submit a full bug report,
with preprocessed source if appropriate.
Please include the complete backtrace with any bug report.
See <http://gcc.gnu.org/bugs.html> for instructions.

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