Fix ICE in substring-handling building 502.gcc_r (PR 87562)
[official-gcc.git] / gcc / testsuite / gcc.dg / pr51408.c
blob2cc5cf967b628f611448e87fb90945227d097e01
1 /* This testcase used to fail because of a bug in
2 arm.md:*minmax_arithsi. */
4 /* { dg-do run } */
5 /* { dg-options "-O1" } */
7 extern void abort (void);
9 int __attribute__((noinline))
10 foo (int a, int b)
12 int max = (b > 0) ? b : 0;
13 return max - a;
16 int
17 main (void)
19 if (foo (3, -1) != -3)
20 abort ();
21 return 0;