PR c++/61670
* class.c (remove_zero_width_bit_fields): Check for null DECL_SIZE.
* g++.dg/template/pr61670.C: New test.
From-SVN: r221671
+2015-03-25 Marek Polacek <polacek@redhat.com>
+
+ PR c++/61670
+ * class.c (remove_zero_width_bit_fields): Check for null DECL_SIZE.
+
2015-03-24 Jason Merrill <jason@redhat.com>
PR c++/65046
DECL_INITIAL (*fieldsp).
check_bitfield_decl eventually sets DECL_SIZE (*fieldsp)
to that width. */
- && integer_zerop (DECL_SIZE (*fieldsp)))
+ && (DECL_SIZE (*fieldsp) == NULL_TREE
+ || integer_zerop (DECL_SIZE (*fieldsp))))
*fieldsp = DECL_CHAIN (*fieldsp);
else
fieldsp = &DECL_CHAIN (*fieldsp);
+2015-03-25 Marek Polacek <polacek@redhat.com>
+
+ PR c++/61670
+ * g++.dg/template/pr61670.C: New test.
+
2015-03-25 Paolo Carlini <paolo.carlini@oracle.com>
PR c++/54987
--- /dev/null
+// PR c++/61670
+// { dg-do compile }
+
+template <class>
+class A {
+ A: 0 // { dg-error "" }
+};
+
+A<int> a;