Mercurial > hg > CbC > CbC_gcc
comparison gcc/testsuite/g++.dg/lto/alias-4_0.C @ 145:1830386684a0
gcc-9.2.0
author | anatofuz |
---|---|
date | Thu, 13 Feb 2020 11:34:05 +0900 |
parents | |
children |
comparison
equal
deleted
inserted
replaced
131:84e7813d76e9 | 145:1830386684a0 |
---|---|
1 /* { dg-lto-do run } */ | |
2 /* { dg-lto-options { { -O3 -flto -fno-early-inlining } } } */ | |
3 __attribute__ ((used)) | |
4 short *ptr_init, **ptr=&ptr_init; | |
5 | |
6 __attribute__ ((used)) | |
7 struct a { | |
8 int *aptr; | |
9 } a, *aptr=&a; | |
10 | |
11 void | |
12 write_ptr () | |
13 { | |
14 *aptr = a; | |
15 } | |
16 | |
17 __attribute__ ((used)) | |
18 void | |
19 test () | |
20 { | |
21 *ptr = (short int *)0; | |
22 write_ptr (); | |
23 if (!__builtin_constant_p (*ptr == (void *)0)) | |
24 __builtin_abort (); | |
25 } | |
26 int | |
27 main() | |
28 { | |
29 test (); | |
30 return 0; | |
31 } |