re PR lto/81406 (ICE in check_die, at dwarf2out.c:6185)
authorJakub Jelinek <jakub@redhat.com>
Thu, 14 Dec 2017 15:26:00 +0000 (16:26 +0100)
committerJakub Jelinek <jakub@gcc.gnu.org>
Thu, 14 Dec 2017 15:26:00 +0000 (16:26 +0100)
PR lto/81406
* gcc.dg/lto/pr81406_0.c: New test.

From-SVN: r255643

gcc/testsuite/ChangeLog
gcc/testsuite/gcc.dg/lto/pr81406_0.c [new file with mode: 0644]

index a053fcba4d08cb0d97c7d7c40767cde656557b18..4fac0015fd2a700f7ae8a6d752d0daa807798962 100644 (file)
@@ -1,3 +1,8 @@
+2017-12-14  Jakub Jelinek  <jakub@redhat.com>
+
+       PR lto/81406
+       * gcc.dg/lto/pr81406_0.c: New test.
+
 2017-12-14  Richard Biener  <rguenther@suse.de>
 
        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 (file)
index 0000000..44ef3c7
--- /dev/null
@@ -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;
+}