AVR: target/84211 - Add a post reload register optimization pass.
[official-gcc.git] / gcc / testsuite / gcc.dg / torture / pr79721.c
blob97d20ca97a8a1b06ce02f8ca8474064be5b18bd5
1 /* { dg-do run } */
2 /* { dg-require-effective-target int32plus } */
3 /* We use -ftrapv so that when SCEV final value replacement introduces
4 undefined overflow we trap. UBSAN inhibits final value replacement. */
5 /* { dg-additional-options "-ftrapv" } */
7 int __attribute__((noclone,noinline))
8 foo(int a, int b)
10 int sum = 0;
11 for (int i = 0; i < 60000; i++)
12 sum += a + i * b;
13 return sum;
16 int main(int argc, char **argv)
18 if (foo (-30000, 2) != 1799940000)
19 __builtin_abort ();
20 return 0;