]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
re PR debug/36668 (FAIL: g++.dg/other/PR23205.C scan-assembler .stabs.*foobar:c=i)
authorJakub Jelinek <jakub@redhat.com>
Thu, 30 Oct 2008 00:11:23 +0000 (01:11 +0100)
committerJakub Jelinek <jakub@gcc.gnu.org>
Thu, 30 Oct 2008 00:11:23 +0000 (01:11 +0100)
PR debug/36668
* g++.dg/other/PR23205.C: Allow foobar to be defined as variable.
* g++.dg/other/pr23205-2.C: New test.

From-SVN: r141453

gcc/testsuite/ChangeLog
gcc/testsuite/g++.dg/other/PR23205.C
gcc/testsuite/g++.dg/other/pr23205-2.C [new file with mode: 0644]

index 03a3df90722eff1e7250ef021864836980d533ba..295f8dee00f6a12c027ce6ce143797086fdf850c 100644 (file)
@@ -1,3 +1,9 @@
+2008-10-30  Jakub Jelinek  <jakub@redhat.com>
+
+       PR debug/36668
+       * g++.dg/other/PR23205.C: Allow foobar to be defined as variable.
+       * g++.dg/other/pr23205-2.C: New test.
+
 2008-10-29  David Edelsohn  <edelsohn@gnu.org>
 
        * gcc.c-torture/compile/pr37878.c: New test.
index 6852f82f5ef62f076ce0f8e942c008b3cc071b18..ae2f0b166443efef81a359014876af1e84f9f4e9 100644 (file)
@@ -15,4 +15,4 @@ int main()
         return i;
 }
 
-/* { dg-final { scan-assembler ".stabs.*foobar:c=i" } } */
+/* { dg-final { scan-assembler ".stabs.*foobar:(c=i|S)" } } */
diff --git a/gcc/testsuite/g++.dg/other/pr23205-2.C b/gcc/testsuite/g++.dg/other/pr23205-2.C
new file mode 100644 (file)
index 0000000..608108a
--- /dev/null
@@ -0,0 +1,18 @@
+/* { dg-do compile } */
+/* { dg-skip-if "No stabs" { mmix-*-* *-*-aix* *-*-netware* alpha*-*-* hppa*64*-*-* ia64-*-* } { "*" } { "" } } */
+/* { dg-options "-gstabs+ -fno-eliminate-unused-debug-types -ftoplevel-reorder" } */
+
+const int foobar = 4;
+int foo ()
+{
+        return foobar + 1;
+}
+
+int main()
+{
+        int i;
+        i = foo();
+        return i;
+}
+
+/* { dg-final { scan-assembler ".stabs.*foobar:c=i" } } */