[committed] Add two testcases

Jakub Jelinek jakub@redhat.com
Wed Nov 10 23:24:00 GMT 2010


Hi!

I'm committing these two testcases for recent PRs that have been DUPed
to other, already fixed, PRs.

2010-11-10  Jakub Jelinek  <jakub@redhat.com>

	PR debug/46409
	* gcc.dg/debug/pr46409.c: New test.

	PR c++/46368
	* g++.dg/cpp0x/constexpr-defarg2.C: New test.

--- gcc/testsuite/gcc.dg/debug/pr46409.c.jj	2010-11-10 13:45:17.000000000 +0100
+++ gcc/testsuite/gcc.dg/debug/pr46409.c	2010-11-10 13:45:00.000000000 +0100
@@ -0,0 +1,9 @@
+/* PR debug/46409 */
+/* { dg-options "-g" } */
+
+int
+foo (int (*x) (unsigned long long), unsigned long long y)
+{
+  unsigned int z = x (y);
+  return 0;
+}
--- gcc/testsuite/g++.dg/cpp0x/constexpr-defarg2.C.jj	2010-11-10 15:06:42.000000000 +0100
+++ gcc/testsuite/g++.dg/cpp0x/constexpr-defarg2.C	2010-11-10 15:06:30.000000000 +0100
@@ -0,0 +1,44 @@
+// PR c++/46368
+// { dg-options "-std=c++0x" }
+
+class A;
+
+class B
+{
+  A foo ();
+  A bar ();
+};
+
+class C
+{
+};
+
+struct D
+{
+  D (C);
+};
+
+struct A : D
+{
+  A (const C & n) : D (n) {}
+};
+
+A baz (const char *, A = C ());
+
+A
+B::foo ()
+{
+  try
+    {
+      baz ("foo");
+    }
+  catch (...)
+    {
+    }
+}
+
+A
+B::bar ()
+{
+  baz ("bar");
+}

	Jakub



More information about the Gcc-patches mailing list