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>
|
2013-11-05 Paolo Carlini <paolo.carlini@oracle.com>
|
||||||
|
|
||||||
PR c++/58724
|
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)
|
&& !(init && BRACE_ENCLOSED_INITIALIZER_P (init)
|
||||||
&& CP_AGGREGATE_TYPE_P (type)
|
&& CP_AGGREGATE_TYPE_P (type)
|
||||||
&& (CLASS_TYPE_P (type)
|
&& (CLASS_TYPE_P (type)
|
||||||
|
|| !TYPE_NEEDS_CONSTRUCTING (type)
|
||||||
|| type_has_extended_temps (type))))
|
|| type_has_extended_temps (type))))
|
||||||
{
|
{
|
||||||
init_code = build_aggr_init_full_exprs (decl, init, flags);
|
init_code = build_aggr_init_full_exprs (decl, init, flags);
|
||||||
|
|
|
@ -0,0 +1,3 @@
|
||||||
|
// PR c++/58868
|
||||||
|
|
||||||
|
static struct { const int i; } a[] = { 1 };
|
Loading…
Reference in New Issue