Commit 2a924bb4 by Marek Polacek Committed by Marek Polacek

re PR c++/61670 (ICE on invalid in tree_nop_conversion)

	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
parent b7f5cbad
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
......
......@@ -5434,7 +5434,8 @@ remove_zero_width_bit_fields (tree t)
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
......
// PR c++/61670
// { dg-do compile }
template <class>
class A {
A: 0 // { dg-error "" }
};
A<int> a;
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment