comparison gcc/testsuite/g++.dg/lto/alias-3_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
4 struct a
5 {
6 int foo,bar;
7 };
8 struct b
9 {
10 struct a a[10];
11 };
12
13 __attribute__ ((used)) struct b b, *bptr=&b, *bptr2=&b;
14 __attribute__ ((used)) int i,j;
15
16 extern "C" void inline_me_late (void);
17 int n=1;
18
19 int
20 main (void)
21 {
22 int jj=j;
23 bptr2->a[jj].bar = 0;
24 for (int i=0; i<n; i++)
25 inline_me_late ();
26 if (!__builtin_constant_p (bptr2->a[jj].bar == 0))
27 __builtin_abort ();
28 return 0;
29 }