Patchwork [C++,testcase,committed] PR 57827

login
register
mail settings
Submitter Paolo Carlini
Date July 10, 2013, 11:17 p.m.
Message ID <51DDEB8E.9040108@oracle.com>
Download mbox | patch
Permalink /patch/258266/
State New
Headers show

Comments

Paolo Carlini - July 10, 2013, 11:17 p.m.
Hi,

committed to mainline.

Thanks,
Paolo.

/////////////////////////
2013-07-10  Paolo Carlini  <paolo.carlini@oracle.com>

	PR c++/57827
	* g++.dg/cpp0x/constexpr-ice7.C: New.

Patch

Index: g++.dg/cpp0x/constexpr-ice7.C
===================================================================
--- g++.dg/cpp0x/constexpr-ice7.C	(revision 0)
+++ g++.dg/cpp0x/constexpr-ice7.C	(working copy)
@@ -0,0 +1,15 @@ 
+// PR c++/57827
+// { dg-do compile { target c++11 } }
+
+struct C
+{
+  constexpr int fun (int x)
+  {
+    return x + 1;
+  }
+
+  int a = 2;
+  int b = fun(a);
+};
+
+C c;