From: Jakub Jelinek Date: Thu, 14 Dec 2017 15:26:00 +0000 (+0100) Subject: re PR lto/81406 (ICE in check_die, at dwarf2out.c:6185) X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=e2c6cfac8e7b9e92e0d51332d6143dc47a982020;p=gcc.git re PR lto/81406 (ICE in check_die, at dwarf2out.c:6185) PR lto/81406 * gcc.dg/lto/pr81406_0.c: New test. From-SVN: r255643 --- diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog index a053fcba4d0..4fac0015fd2 100644 --- a/gcc/testsuite/ChangeLog +++ b/gcc/testsuite/ChangeLog @@ -1,3 +1,8 @@ +2017-12-14 Jakub Jelinek + + PR lto/81406 + * gcc.dg/lto/pr81406_0.c: New test. + 2017-12-14 Richard Biener PR tree-optimization/66974 diff --git a/gcc/testsuite/gcc.dg/lto/pr81406_0.c b/gcc/testsuite/gcc.dg/lto/pr81406_0.c new file mode 100644 index 00000000000..44ef3c73992 --- /dev/null +++ b/gcc/testsuite/gcc.dg/lto/pr81406_0.c @@ -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; +}