Mercurial > hg > CbC > CbC_gcc
comparison gcc/testsuite/gcc.dg/lto/20081201-1_0.c @ 111:04ced10e8804
gcc 7
author | kono |
---|---|
date | Fri, 27 Oct 2017 22:46:09 +0900 |
parents | |
children |
comparison
equal
deleted
inserted
replaced
68:561a7518be6b | 111:04ced10e8804 |
---|---|
1 /* { dg-lto-options {{-O2 -DOPTIMIZE -flto -flto-partition=1to1} {-O0 -flto -flto-partition=1to1}} } */ | |
2 | |
3 extern void abort (void); | |
4 extern int foo (void); | |
5 | |
6 int | |
7 f (void) | |
8 { | |
9 return 1; | |
10 } | |
11 | |
12 extern inline int __attribute__((gnu_inline)) | |
13 e_inline_baz (void) | |
14 { | |
15 return 1 + f(); | |
16 } | |
17 | |
18 int | |
19 bar (void) | |
20 { | |
21 return e_inline_baz (); | |
22 } | |
23 | |
24 int | |
25 main () | |
26 { | |
27 #ifdef OPTIMIZE | |
28 if (bar () != 2 || foo () != 3) | |
29 abort (); | |
30 #else | |
31 if (bar () != 0 || foo () != 0) | |
32 abort (); | |
33 #endif | |
34 return 0; | |
35 } |