Bug 77724 - [7 Regression] bootstrap-O3 broken: ICE: in tree_to_uhwi, at tree.c:7330
Summary: [7 Regression] bootstrap-O3 broken: ICE: in tree_to_uhwi, at tree.c:7330
Status: RESOLVED FIXED
Alias: None
Product: gcc
Classification: Unclassified
Component: tree-optimization (show other bugs)
Version: 7.0
: P3 normal
Target Milestone: 7.0
Assignee: Not yet assigned to anyone
URL:
Keywords: build, ice-on-valid-code
Depends on:
Blocks:
 
Reported: 2016-09-24 15:38 UTC by Markus Trippelsdorf
Modified: 2016-09-28 05:18 UTC (History)
2 users (show)

See Also:
Host:
Target:
Build:
Known to work:
Known to fail:
Last reconfirmed: 2016-09-24 00:00:00


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Markus Trippelsdorf 2016-09-24 15:38:49 UTC
markus@x4 libquadmath % cat strtoflt128.i
int a[81];
int b, c;
__float128 fn1(nptr, endptr, group) int nptr;
int endptr;
int group;
{
  int d = b;
  for (; c; --c)
    a[c + d] = a[c];
  return 0;
}

markus@x4 libquadmath % gcc -O3 -c strtoflt128.i
strtoflt128.i: In function ‘fn1’:
strtoflt128.i:3:12: internal compiler error: in tree_to_uhwi, at tree.c:7330
 __float128 fn1(nptr, endptr, group) int nptr;
            ^~~
0xe5f30a tree_to_uhwi(tree_node const*)
        ../../gcc/gcc/tree.c:7330
0xe204a6 create_intersect_range_checks_index
        ../../gcc/gcc/tree-vect-loop-manip.c:2313
0xe204a6 create_intersect_range_checks
        ../../gcc/gcc/tree-vect-loop-manip.c:2412
0xe204a6 vect_create_cond_for_alias_checks(_loop_vec_info*, tree_node**)
        ../../gcc/gcc/tree-vect-loop-manip.c:2500
0xe21b62 vect_loop_versioning(_loop_vec_info*, unsigned int, bool)
        ../../gcc/gcc/tree-vect-loop-manip.c:2574
0xe11107 vect_transform_loop(_loop_vec_info*)
        ../../gcc/gcc/tree-vect-loop.c:6780
0xe311e4 vectorize_loops()
        ../../gcc/gcc/tree-vectorizer.c:585
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 2016-09-24 15:45:05 UTC
Cleaned up testcase:

int a[81];
int b, c;
void fn1() {
  int d = b;
  for (; c; --c)
    a[c + d] = a[c];
}
Comment 2 Markus Trippelsdorf 2016-09-24 15:49:26 UTC
Started with r240412:

commit 2227160d6674e3e822a8d74c2d24452e3dc7eea1
Author: amker <amker@138bc75d-0d04-0410-961f-82ee72b054a4>
Date:   Fri Sep 23 09:47:52 2016 +0000

            * tree-vect-loop-manip.c (create_intersect_range_checks_index): New.
            (create_intersect_range_checks): New.
            (vect_create_cond_for_alias_checks): Call above function.
Comment 3 Markus Trippelsdorf 2016-09-28 05:14:51 UTC
Author: trippels
Date: Wed Sep 28 05:13:19 2016
New Revision: 240565

URL: https://gcc.gnu.org/viewcvs?rev=240565&root=gcc&view=rev
Log:
Fix PR tree-optimization/77724

2016-09-27  Robin Dapp  <rdapp@linux.vnet.ibm.com>

        PR tree-optimization/77724
        * tree-vect-loop-manip.c (create_intersect_range_checks_index):
        Add tree_fits_shwi_p check.

Added:
    trunk/gcc/testsuite/gcc.dg/vect/pr77724.c
Modified:
    trunk/gcc/ChangeLog
    trunk/gcc/tree-vect-loop-manip.c
Comment 4 Markus Trippelsdorf 2016-09-28 05:18:03 UTC
Fixed.