mirror of
git://gcc.gnu.org/git/gcc.git
synced 2025-03-21 02:50:27 +08:00
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
This commit is contained in:
parent
b7f5cbad2e
commit
2a924bb46c
@ -1,3 +1,8 @@
|
||||
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);
|
||||
|
@ -1,3 +1,8 @@
|
||||
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
|
||||
|
9
gcc/testsuite/g++.dg/template/pr61670.C
Normal file
9
gcc/testsuite/g++.dg/template/pr61670.C
Normal file
@ -0,0 +1,9 @@
|
||||
// PR c++/61670
|
||||
// { dg-do compile }
|
||||
|
||||
template <class>
|
||||
class A {
|
||||
A: 0 // { dg-error "" }
|
||||
};
|
||||
|
||||
A<int> a;
|
Loading…
x
Reference in New Issue
Block a user