PR tree-optimization/84740
[official-gcc.git] / gcc / testsuite / gcc.dg / lto / alias-1_0.c
blob48ef54fd59ec950bc15b6965de237b19801865f5
1 /* { dg-lto-do run } */
2 /* { dg-lto-options { { -O2 -flto } } } */
3 int val;
5 __attribute__ ((used))
6 int *ptr = &val;
7 __attribute__ ((used))
8 float *ptr2 = (void *)&val;
10 extern void typefun(float val);
12 void link_error (void);
14 int
15 main()
17 *ptr=1;
18 typefun (0);
19 if (*ptr)
20 __builtin_abort ();
21 return 0;