c++: Fix ICE with #embed/RAW_DATA_CST after list conversion [PR118671]
[official-gcc.git] / gcc / testsuite / gcc.dg / tree-ssa / pr102232.c
blob59ec52ad199aa7627963aae92de8309abf98386c
1 /* PR tree-optimization/102232 */
2 /* { dg-do run } */
3 /* { dg-options "-O -fdump-tree-optimized" } */
4 /* { dg-require-effective-target int32plus } */
6 int __attribute__ ((noipa)) foo (int a, int b)
8 return b * (1 + a / b) - a;
11 int
12 main (void)
14 // few randomly generated test cases
15 if (foo (71856034, 238) != 212)
17 __builtin_abort ();
19 if (foo (71856034, 10909) != 1549)
21 __builtin_abort ();
23 if (foo (20350, 1744) != 578)
25 __builtin_abort ();
27 if (foo (444813, 88563) != 86565)
29 __builtin_abort ();
31 if (foo (112237, 63004) != 13771)
33 __builtin_abort ();
35 if (foo (68268386, 787116) != 210706)
37 __builtin_abort ();
39 if (foo (-444813, 88563) != 90561)
41 __builtin_abort ();
43 if (foo (-68268386, 787116) != 1363526)
45 __builtin_abort ();
48 return 0;
51 /* Verify that multiplication and division has been removed. */
52 /* { dg-final { scan-tree-dump-not " \\* " "optimized" } } */
53 /* { dg-final { scan-tree-dump-not " / " "optimized" } } */