mirror of
git://gcc.gnu.org/git/gcc.git
synced 2025-04-23 00:51:00 +08:00
re PR tree-optimization/71521 (Regression in GCC-7.0.0's optimizer)
2016-06-14 Richard Biener <rguenther@suse.de> PR tree-optimization/71521 * tree-vrp.c (extract_range_from_binary_expr_1): Guard division int_const_binop against zero divisor. * gcc.dg/tree-ssa/vrp101.c: New testcase. From-SVN: r237425
This commit is contained in:
parent
3db5773f70
commit
90b72e84c4
@ -1,3 +1,9 @@
|
||||
2016-06-14 Richard Biener <rguenther@suse.de>
|
||||
|
||||
PR tree-optimization/71521
|
||||
* tree-vrp.c (extract_range_from_binary_expr_1): Guard
|
||||
division int_const_binop against zero divisor.
|
||||
|
||||
2016-06-13 Uros Bizjak <ubizjak@gmail.com>
|
||||
|
||||
* config/i386/i386.md (signbittf2): New expander.
|
||||
|
@ -1,3 +1,9 @@
|
||||
2016-06-14 Richard Biener <rguenther@suse.de>
|
||||
|
||||
PR tree-optimization/71521
|
||||
* tree-vrp.c (extract_range_from_binary_expr_1): Guard
|
||||
division int_const_binop against zero divisor.
|
||||
|
||||
2016-06-13 Jakub Jelinek <jakub@redhat.com>
|
||||
|
||||
PR sanitizer/71498
|
||||
|
13
gcc/testsuite/gcc.dg/tree-ssa/vrp101.c
Normal file
13
gcc/testsuite/gcc.dg/tree-ssa/vrp101.c
Normal file
@ -0,0 +1,13 @@
|
||||
/* { dg-do compile } */
|
||||
/* { dg-options "-O2 -fdump-tree-optimized" } */
|
||||
|
||||
int x = 1;
|
||||
|
||||
int main ()
|
||||
{
|
||||
int t = (1/(1>=x))>>1;
|
||||
if (t != 0) __builtin_abort();
|
||||
return 0;
|
||||
}
|
||||
|
||||
/* { dg-final { scan-tree-dump "<bb 2>:\[\n\r \]*return 0;" "optimized" } } */
|
@ -2938,7 +2938,8 @@ extract_range_from_binary_expr_1 (value_range *vr,
|
||||
and divisor are available. */
|
||||
if (vr1.type == VR_RANGE
|
||||
&& !symbolic_range_p (&vr0)
|
||||
&& !symbolic_range_p (&vr1))
|
||||
&& !symbolic_range_p (&vr1)
|
||||
&& compare_values (vr1.max, zero) != 0)
|
||||
min = int_const_binop (code, vr0.min, vr1.max);
|
||||
else
|
||||
min = zero;
|
||||
|
Loading…
x
Reference in New Issue
Block a user