Mercurial > hg > CbC > CbC_gcc
annotate gcc/testsuite/gcc.dg/ifcvt-fabs-1.c @ 111:04ced10e8804
gcc 7
author | kono |
---|---|
date | Fri, 27 Oct 2017 22:46:09 +0900 |
parents | |
children |
rev | line source |
---|---|
111 | 1 /* { dg-do run } */ |
2 /* { dg-options "-O" } */ | |
3 /* { dg-options "-O -march=i686" { target { { i?86-*-* x86_64-*-* } && ia32 } } } */ | |
4 | |
5 extern void abort(void); | |
6 | |
7 float foo(float f) | |
8 { | |
9 if (f < 0.0f) | |
10 f = -f; | |
11 | |
12 return f; | |
13 } | |
14 | |
15 int main(void) | |
16 { | |
17 if (foo (-1.0f) != 1.0f) | |
18 abort (); | |
19 | |
20 return 0; | |
21 } |