PR c++/79967
* decl.c (grokdeclarator): Check ATTRLIST before dereferencing it.
* g++.dg/cpp0x/gen-attrs-63.C: New test.
From-SVN: r246039
+2017-03-10 Marek Polacek <polacek@redhat.com>
+
+ PR c++/79967
+ * decl.c (grokdeclarator): Check ATTRLIST before dereferencing it.
+
2017-03-10 Jakub Jelinek <jakub@redhat.com>
PR c++/79899
if (declarator
&& declarator->kind == cdk_id
- && declarator->std_attributes)
+ && declarator->std_attributes
+ && attrlist != NULL)
/* [dcl.meaning]/1: The optional attribute-specifier-seq following
a declarator-id appertains to the entity that is declared. */
*attrlist = chainon (*attrlist, declarator->std_attributes);
+2017-03-10 Marek Polacek <polacek@redhat.com>
+
+ PR c++/79967
+ * g++.dg/cpp0x/gen-attrs-63.C: New test.
+
2017-03-10 Jakub Jelinek <jakub@redhat.com>
PR c++/79899
--- /dev/null
+// PR c++/79967
+// { dg-do compile { target c++11 } }
+
+template <void f [[noreturn]]()>
+struct A
+{
+ int g () { f (); return 0; }
+};
+
+void f ();
+
+void g (A<f> a) { a.g (); }