re PR debug/59323 (Int. comp. error: in add_AT_specification, at dwarf2out.c:4026)
authorRichard Biener <rguenther@suse.de>
Thu, 28 Nov 2013 15:22:55 +0000 (15:22 +0000)
committerRichard Biener <rguenth@gcc.gnu.org>
Thu, 28 Nov 2013 15:22:55 +0000 (15:22 +0000)
2013-11-28  Richard Biener  <rguenther@suse.de>

PR lto/59323
* gcc.dg/lto/pr59323-2_0.c: New testcase.

From-SVN: r205487

gcc/testsuite/ChangeLog
gcc/testsuite/gcc.dg/lto/pr59323-2_0.c [new file with mode: 0644]

index 3206152..7335621 100644 (file)
@@ -1,5 +1,10 @@
 2013-11-28  Richard Biener  <rguenther@suse.de>
 
+       PR lto/59323
+       * gcc.dg/lto/pr59323-2_0.c: New testcase.
+
+2013-11-28  Richard Biener  <rguenther@suse.de>
+
        PR tree-optimization/59330
        * gcc.dg/torture/pr59330.c: New testcase.
 
diff --git a/gcc/testsuite/gcc.dg/lto/pr59323-2_0.c b/gcc/testsuite/gcc.dg/lto/pr59323-2_0.c
new file mode 100644 (file)
index 0000000..938a89d
--- /dev/null
@@ -0,0 +1,37 @@
+/* { dg-lto-do link } */
+/* { dg-lto-options { { -O2 -g -flto } } } */
+/* { dg-extra-ld-options { -r -nostdlib } } */
+
+extern void bar(void);
+
+int main(int argc, char **argv)
+{
+  int i;
+
+  if (argc == 1) {
+    extern void bar ();
+
+    bar();
+
+    {
+      extern void bar ();
+
+      asm goto ("" : : : : lab);
+lab:
+      ;
+    }
+  }
+
+  {
+    extern void bar ();
+
+    int foo(void)
+    {
+      return argv[0][0];
+    }
+
+    i = foo();
+  }
+
+  return i;
+}