diff options
author | Richard Biener <rguenther@suse.de> | 2017-01-30 14:24:37 +0000 |
---|---|---|
committer | Richard Biener <rguenth@gcc.gnu.org> | 2017-01-30 14:24:37 +0000 |
commit | 0c7247cc1e822a29b8b4d009b30bb17f2c0c841b (patch) | |
tree | 2b9fef4592dae59eb3fb15eb1c01a6309391d850 /gcc | |
parent | fcc216ec44d7403368285c045846d4419b631cb5 (diff) | |
download | gcc-0c7247cc1e822a29b8b4d009b30bb17f2c0c841b.zip gcc-0c7247cc1e822a29b8b4d009b30bb17f2c0c841b.tar.gz gcc-0c7247cc1e822a29b8b4d009b30bb17f2c0c841b.tar.bz2 |
re PR tree-optimization/79276 (ICE: Segmentation fault in VRP pass)
2017-01-30 Richard Biener <rguenther@suse.de>
PR tree-optimization/79276
* tree-vrp.c (process_assert_insertions): Properly adjust common
when removing a duplicate.
* gcc.dg/torture/pr79276.c: New testcase.
From-SVN: r245026
Diffstat (limited to 'gcc')
-rw-r--r-- | gcc/ChangeLog | 8 | ||||
-rw-r--r-- | gcc/testsuite/ChangeLog | 5 | ||||
-rw-r--r-- | gcc/testsuite/gcc.dg/torture/pr79276.c | 8 | ||||
-rw-r--r-- | gcc/tree-vrp.c | 5 |
4 files changed, 26 insertions, 0 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 96a210e..9339949 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,5 +1,13 @@ 2017-01-30 Richard Biener <rguenther@suse.de> + PR tree-optimization/79276 + * tree-vrp.c (process_assert_insertions): Properly adjust common + when removing a duplicate. + + * gcc.dg/torture/pr79276.c: New testcase. + +2017-01-30 Richard Biener <rguenther@suse.de> + PR tree-optimization/79256 * targhooks.c (default_builtin_vector_alignment_reachable): Honor BIGGEST_FIELD_ALIGNMENT and ADJUST_FIELD_ALIGN to fix up bogus diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog index f93fc0c..33f0248 100644 --- a/gcc/testsuite/ChangeLog +++ b/gcc/testsuite/ChangeLog @@ -1,3 +1,8 @@ +2017-01-30 Richard Biener <rguenther@suse.de> + + PR tree-optimization/79276 + * gcc.dg/torture/pr79276.c: New testcase. + 2017-01-30 Dominik Vogt <vogt@linux.vnet.ibm.com> PR target/79240 diff --git a/gcc/testsuite/gcc.dg/torture/pr79276.c b/gcc/testsuite/gcc.dg/torture/pr79276.c new file mode 100644 index 0000000..4abc2a0 --- /dev/null +++ b/gcc/testsuite/gcc.dg/torture/pr79276.c @@ -0,0 +1,8 @@ +/* { dg-do compile } */ + +short int +ix (int *ld, short int oi) +{ + *ld = ((unsigned short int)oi | oi) && !!(*ld); + return (oi != 0) ? oi : 1; +} diff --git a/gcc/tree-vrp.c b/gcc/tree-vrp.c index 5c43e35..b429217 100644 --- a/gcc/tree-vrp.c +++ b/gcc/tree-vrp.c @@ -6544,6 +6544,11 @@ process_assert_insertions (void) else if (loc->e == asserts[j-1]->e) { /* Remove duplicate asserts. */ + if (commonj == j - 1) + { + commonj = j; + common = loc; + } free (asserts[j-1]); asserts[j-1] = NULL; } |