Patchwork [committed] Add two testcases

login
register
mail settings
Submitter Jakub Jelinek
Date Nov. 10, 2010, 11:22 p.m.
Message ID <20101110232227.GA29412@tyan-ft48-01.lab.bos.redhat.com>
Download mbox | patch
Permalink /patch/70728/
State New
Headers show

Comments

Jakub Jelinek - Nov. 10, 2010, 11:22 p.m.
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.


	Jakub

Patch

--- 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");
+}