Bug 59050 - [4.9 Regression] ICE: tree check: expected integer_cst, have nop_expr in tree_int_cst_lt, at tree.c:7083
Summary: [4.9 Regression] ICE: tree check: expected integer_cst, have nop_expr in tree...
Status: RESOLVED FIXED
Alias: None
Product: gcc
Classification: Unclassified
Component: tree-optimization (show other bugs)
Version: 4.9.0
: P3 normal
Target Milestone: 4.9.0
Assignee: Cong Hou
URL:
Keywords:
: 59059 (view as bug list)
Depends on:
Blocks:
 
Reported: 2013-11-08 13:20 UTC by Markus Trippelsdorf
Modified: 2013-11-11 19:41 UTC (History)
2 users (show)

See Also:
Host:
Target:
Build:
Known to work:
Known to fail:
Last reconfirmed: 2013-11-08 00:00:00


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Markus Trippelsdorf 2013-11-08 13:20:59 UTC
markus@x4 tsan % cat test.ii
struct {
  int trace[6];
} a;
void fn1() {
  for (int i; i; i++) {
    a.trace[i] = a.trace[-i];
    a.trace[-i] = 0;
  }
}

markus@x4 tsan % /var/tmp/gcc_build_dir/./gcc/xgcc -B/var/tmp/gcc_build_dir/./gcc -O3 test.ii
test.ii:3:3: warning: anonymous type with no linkage used to declare variable ‘<anonymous struct> a’ with linkage [enabled by default]
 } a;
   ^
test.ii: In function ‘void fn1()’:
test.ii:4:6: internal compiler error: tree check: expected integer_cst, have nop_expr in tree_int_cst_lt, at tree.c:7083
 void fn1() {
      ^
0xd1c3f4 tree_check_failed(tree_node const*, char const*, int, char const*, ...)
        ../../gcc/gcc/tree.c:9477
0xd1e354 tree_check
        ../../gcc/gcc/tree.h:2914
0xd1e354 tree_int_cst_lt(tree_node const*, tree_node const*)
        ../../gcc/gcc/tree.c:7083
0xd1e390 tree_int_cst_compare(tree_node const*, tree_node const*)
        ../../gcc/gcc/tree.c:7093
0x100228c comp_dr_addr_with_seg_len_pair
        ../../gcc/gcc/tree-vect-data-refs.c:2672
0x100af25 vec<dr_addr_with_seg_len_pair_t, va_heap, vl_embed>::qsort(int (*)(void const*, void const*))
        ../../gcc/gcc/vec.h:941
0x100af25 vec<dr_addr_with_seg_len_pair_t, va_heap, vl_ptr>::qsort(int (*)(void const*, void const*))
        ../../gcc/gcc/vec.h:1620
0x100af25 vect_prune_runtime_alias_test_list(_loop_vec_info*)
        ../../gcc/gcc/tree-vect-data-refs.c:2845
0xce76f2 vect_analyze_loop_2
        ../../gcc/gcc/tree-vect-loop.c:1716
0xce76f2 vect_analyze_loop(loop*)
        ../../gcc/gcc/tree-vect-loop.c:1807
0xcfdaff vectorize_loops()
        ../../gcc/gcc/tree-vectorizer.c:360
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.
Comment 1 Markus Trippelsdorf 2013-11-08 13:39:37 UTC
Started with r204538.
Comment 2 Richard Biener 2013-11-08 14:35:14 UTC
Confirmed.  Also a few gfortran testcases fail that way after the patch.
Comment 3 Dominique d'Humieres 2013-11-09 15:58:29 UTC
*** Bug 59059 has been marked as a duplicate of this bug. ***
Comment 4 Cong Hou 2013-11-11 19:03:40 UTC
Author: congh
Date: Mon Nov 11 19:03:39 2013
New Revision: 204683

URL: http://gcc.gnu.org/viewcvs?rev=204683&root=gcc&view=rev
Log:
2013-11-11  Cong Hou  <congh@google.com>

    PR tree-optimization/59050
    * tree-vect-data-refs.c (comp_dr_addr_with_seg_len_pair): Bug fix.


Modified:
    trunk/gcc/ChangeLog
    trunk/gcc/tree-vect-data-refs.c
Comment 5 Cong Hou 2013-11-11 19:41:32 UTC
(In reply to congh from comment #4)
> Author: congh
> Date: Mon Nov 11 19:03:39 2013
> New Revision: 204683
> 
> URL: http://gcc.gnu.org/viewcvs?rev=204683&root=gcc&view=rev
> Log:
> 2013-11-11  Cong Hou  <congh@google.com>
> 
>     PR tree-optimization/59050
>     * tree-vect-data-refs.c (comp_dr_addr_with_seg_len_pair): Bug fix.
> 
> 
> Modified:
>     trunk/gcc/ChangeLog
>     trunk/gcc/tree-vect-data-refs.c