re PR tree-optimization/55022 (air.f90 is miscompliled with -m64 -O2 -fgraphite-identity after revision 190619)
2014-04-14 Richard Biener <rguenther@suse.de> PR middle-end/55022 * fold-const.c (negate_expr_p): Don't negate directional rounding division. (fold_negate_expr): Likewise. * gcc.dg/graphite/pr55022.c: New testcase. From-SVN: r209356
This commit is contained in:
parent
033aa406ca
commit
a3c77ce941
@ -1,3 +1,10 @@
|
||||
2014-04-14 Richard Biener <rguenther@suse.de>
|
||||
|
||||
PR middle-end/55022
|
||||
* fold-const.c (negate_expr_p): Don't negate directional rounding
|
||||
division.
|
||||
(fold_negate_expr): Likewise.
|
||||
|
||||
2014-04-14 Richard Biener <rguenther@suse.de>
|
||||
|
||||
PR tree-optimization/59817
|
||||
|
@ -484,8 +484,6 @@ negate_expr_p (tree t)
|
||||
|
||||
case TRUNC_DIV_EXPR:
|
||||
case ROUND_DIV_EXPR:
|
||||
case FLOOR_DIV_EXPR:
|
||||
case CEIL_DIV_EXPR:
|
||||
case EXACT_DIV_EXPR:
|
||||
/* In general we can't negate A / B, because if A is INT_MIN and
|
||||
B is 1, we may turn this into INT_MIN / -1 which is undefined
|
||||
@ -682,8 +680,6 @@ fold_negate_expr (location_t loc, tree t)
|
||||
|
||||
case TRUNC_DIV_EXPR:
|
||||
case ROUND_DIV_EXPR:
|
||||
case FLOOR_DIV_EXPR:
|
||||
case CEIL_DIV_EXPR:
|
||||
case EXACT_DIV_EXPR:
|
||||
/* In general we can't negate A / B, because if A is INT_MIN and
|
||||
B is 1, we may turn this into INT_MIN / -1 which is undefined
|
||||
|
@ -1,3 +1,8 @@
|
||||
2014-04-14 Richard Biener <rguenther@suse.de>
|
||||
|
||||
PR middle-end/55022
|
||||
* gcc.dg/graphite/pr55022.c: New testcase.
|
||||
|
||||
2014-04-14 Richard Biener <rguenther@suse.de>
|
||||
|
||||
PR tree-optimization/59817
|
||||
|
27
gcc/testsuite/gcc.dg/graphite/pr55022.c
Normal file
27
gcc/testsuite/gcc.dg/graphite/pr55022.c
Normal file
@ -0,0 +1,27 @@
|
||||
/* { dg-do run } */
|
||||
/* { dg-options "-O2 -fgraphite-identity" } */
|
||||
|
||||
extern void abort (void);
|
||||
|
||||
void __attribute__((noinline,noclone))
|
||||
f(int *limit, int minLen, int maxLen)
|
||||
{
|
||||
int i;
|
||||
|
||||
for (i = minLen; i <= maxLen; i++) {
|
||||
limit[i] = i;
|
||||
}
|
||||
}
|
||||
|
||||
int main()
|
||||
{
|
||||
int limit[256], i;
|
||||
f (limit, 0, 255);
|
||||
for (i = 0; i < 256; ++i)
|
||||
{
|
||||
if (limit[i] != i)
|
||||
abort ();
|
||||
__asm__ volatile ("" : : : "memory");
|
||||
}
|
||||
return 0;
|
||||
}
|
Loading…
x
Reference in New Issue
Block a user