mirror of
git://gcc.gnu.org/git/gcc.git
synced 2025-02-24 19:06:02 +08:00
re PR c++/58868 (ICE: in count_type_elements, at expr.c:5495 with -std=gnu++0x)
PR c++/58868 * decl.c (check_initializer): Don't use build_vec_init for arrays of trivial type. From-SVN: r204406
This commit is contained in:
parent
02ac9503fd
commit
136d4b89f0
@ -1,3 +1,9 @@
|
||||
2013-11-05 Jason Merrill <jason@redhat.com>
|
||||
|
||||
PR c++/58868
|
||||
* decl.c (check_initializer): Don't use build_vec_init for arrays
|
||||
of trivial type.
|
||||
|
||||
2013-11-05 Paolo Carlini <paolo.carlini@oracle.com>
|
||||
|
||||
PR c++/58724
|
||||
|
@ -5683,6 +5683,7 @@ check_initializer (tree decl, tree init, int flags, vec<tree, va_gc> **cleanups)
|
||||
&& !(init && BRACE_ENCLOSED_INITIALIZER_P (init)
|
||||
&& CP_AGGREGATE_TYPE_P (type)
|
||||
&& (CLASS_TYPE_P (type)
|
||||
|| !TYPE_NEEDS_CONSTRUCTING (type)
|
||||
|| type_has_extended_temps (type))))
|
||||
{
|
||||
init_code = build_aggr_init_full_exprs (decl, init, flags);
|
||||
|
3
gcc/testsuite/g++.dg/init/array35.C
Normal file
3
gcc/testsuite/g++.dg/init/array35.C
Normal file
@ -0,0 +1,3 @@
|
||||
// PR c++/58868
|
||||
|
||||
static struct { const int i; } a[] = { 1 };
|
Loading…
Reference in New Issue
Block a user