PR c++/65127
* parser.c (parsing_nsdmi): Don't return true if current_class_ptr
is not a PARM_DECL.
* g++.dg/cpp0x/pr65127.C: New test.
From-SVN: r221332
+2015-03-10 Jakub Jelinek <jakub@redhat.com>
+
+ PR c++/65127
+ * parser.c (parsing_nsdmi): Don't return true if current_class_ptr
+ is not a PARM_DECL.
+
2015-03-10 Jason Merrill <jason@redhat.com>
PR c++/65333
{
/* We recognize NSDMI context by the context-less 'this' pointer set up
by the function above. */
- if (current_class_ptr && DECL_CONTEXT (current_class_ptr) == NULL_TREE)
+ if (current_class_ptr
+ && TREE_CODE (current_class_ptr) == PARM_DECL
+ && DECL_CONTEXT (current_class_ptr) == NULL_TREE)
return true;
return false;
}
+2015-03-10 Jakub Jelinek <jakub@redhat.com>
+
+ PR c++/65127
+ * g++.dg/cpp0x/pr65127.C: New test.
+
2015-03-10 Jan Hubicka <hubicka@ucw.cz>
* gcc.dg/ipa/PR64550.c: Update template.
--- /dev/null
+// PR c++/65127
+// { dg-do compile { target c++11 } }
+
+template <int N>
+void
+foo ()
+{
+ static int i {100};
+ struct { int id {i++}; } j;
+}
+
+int
+main ()
+{
+ foo<0> ();
+}