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

            Bug ID: 59139
           Summary: internal compiler error: in get_val_for, at
                    tree-ssa-loop-niter.c:2267
           Product: gcc
           Version: 4.9.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: c
          Assignee: unassigned at gcc dot gnu.org
          Reporter: regehr at cs dot utah.edu

[regehr@imp test]$ gcc -O3 -c -Wall ./work20/reduce_55RZFl/small.c
./work20/reduce_55RZFl/small.c: In function ‘fn2’:
./work20/reduce_55RZFl/small.c:4:6: internal compiler error: in get_val_for, at
tree-ssa-loop-niter.c:2267
 void fn2() {
      ^
0xafe7c9 get_val_for
    /users/regehr/z/compiler-source/gcc/gcc/tree-ssa-loop-niter.c:2267
0xb0162b loop_niter_by_eval(loop*, edge_def*)
    /users/regehr/z/compiler-source/gcc/gcc/tree-ssa-loop-niter.c:2335
0xb01934 find_loop_niter_by_eval(loop*, edge_def**)
    /users/regehr/z/compiler-source/gcc/gcc/tree-ssa-loop-niter.c:2394
0xae4c5f canonicalize_loop_induction_variables
    /users/regehr/z/compiler-source/gcc/gcc/tree-ssa-loop-ivcanon.c:929
0xae682b canonicalize_induction_variables()
    /users/regehr/z/compiler-source/gcc/gcc/tree-ssa-loop-ivcanon.c:998
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.
[regehr@imp test]$ cat ./work20/reduce_55RZFl/small.c
int a, b, c, d, e;
int fn1(p1, p2) { return p2 == 0 ? p1 : 1 % p2; }

void fn2() {
  c = 0;
  for (;; c = (unsigned short)c) {
    b = 2;
    for (; b; b = a) {
      e = fn1(2, c && 1);
      d = c == 0 ? e : c;
      if (d)
        return;
    }
  }
}
[regehr@imp test]$ gcc -v
Using built-in specs.
COLLECT_GCC=gcc
COLLECT_LTO_WRAPPER=/mnt/local/randomtest/compiler-install/gcc-r204770-install/bin/../libexec/gcc/x86_64-unknown-linux-gnu/4.9.0/lto-wrapper
Target: x86_64-unknown-linux-gnu
Configured with: /users/regehr/z/compiler-source/gcc/configure
--prefix=/users/regehr/z/compiler-install/gcc-r204770-install
--enable-languages=c,c++ --enable-multilib
Thread model: posix
gcc version 4.9.0 20131114 (experimental) (GCC)

Reply via email to