Mercurial > hg > CbC > CbC_gcc
annotate gcc/testsuite/gcc.dg/pr51408.c @ 131:84e7813d76e9
gcc-8.2
author | mir3636 |
---|---|
date | Thu, 25 Oct 2018 07:37:49 +0900 |
parents | 04ced10e8804 |
children |
rev | line source |
---|---|
111 | 1 /* This testcase used to fail because of a bug in |
2 arm.md:*minmax_arithsi. */ | |
3 | |
4 /* { dg-do run } */ | |
5 /* { dg-options "-O1" } */ | |
6 | |
7 extern void abort (void); | |
8 | |
9 int __attribute__((noinline)) | |
10 foo (int a, int b) | |
11 { | |
12 int max = (b > 0) ? b : 0; | |
13 return max - a; | |
14 } | |
15 | |
16 int | |
17 main (void) | |
18 { | |
19 if (foo (3, -1) != -3) | |
20 abort (); | |
21 return 0; | |
22 } |