Message ID | 20171214152738.GU2353@tucnak |
---|---|
State | New |
Headers | show |
Series | [committed] Testcase for PR lto/81406 | expand |
--- gcc/testsuite/gcc.dg/lto/pr81406_0.c.jj 2017-12-14 16:20:44.867849609 +0100 +++ gcc/testsuite/gcc.dg/lto/pr81406_0.c 2017-12-14 16:17:34.000000000 +0100 @@ -0,0 +1,20 @@ +/* PR lto/81406 */ +/* { dg-lto-do link } */ +/* { dg-lto-options { { -O2 -g -flto } } } */ +/* { dg-extra-ld-options { -g -r -nostdlib } } */ + +int a; +int *foo (void); + +static inline int __attribute__ ((__artificial__)) +bar (void) +{ + if (a) + *foo () = 2; +} + +void * +baz (void) +{ + return (void *) bar; +}