re PR c++/62129 (internal compiler error: in output_constant, at varasm.c:4755)
PR c++/62129 * class.c (outermost_open_class): Fix logic. * decl.c (complete_vars): Fix logic. From-SVN: r214353
This commit is contained in:
parent
52d251b522
commit
cea83a3ac8
@ -1,3 +1,9 @@
|
||||
2014-08-22 Jason Merrill <jason@redhat.com>
|
||||
|
||||
PR c++/62129
|
||||
* class.c (outermost_open_class): Fix logic.
|
||||
* decl.c (complete_vars): Fix logic.
|
||||
|
||||
2014-08-22 Jason Merrill <jason@redhat.com>
|
||||
|
||||
PR c++/62129
|
||||
|
@ -7141,7 +7141,9 @@ outermost_open_class (void)
|
||||
if (!current_class_type)
|
||||
return NULL_TREE;
|
||||
tree r = NULL_TREE;
|
||||
for (int i = current_class_depth; i > 0; --i)
|
||||
if (TYPE_BEING_DEFINED (current_class_type))
|
||||
r = current_class_type;
|
||||
for (int i = current_class_depth - 1; i > 0; --i)
|
||||
{
|
||||
if (current_class_stack[i].hidden)
|
||||
break;
|
||||
|
@ -14367,9 +14367,8 @@ complete_vars (tree type)
|
||||
tree var = iv->decl;
|
||||
tree type = TREE_TYPE (var);
|
||||
|
||||
if (decl_constant_var_p (var))
|
||||
DECL_INITIAL (var) = cplus_expand_constant (DECL_INITIAL (var));
|
||||
else
|
||||
if (TYPE_MAIN_VARIANT (strip_array_types (type))
|
||||
== iv->incomplete_type)
|
||||
{
|
||||
/* Complete the type of the variable. The VAR_DECL itself
|
||||
will be laid out in expand_expr. */
|
||||
@ -14377,6 +14376,10 @@ complete_vars (tree type)
|
||||
cp_apply_type_quals_to_decl (cp_type_quals (type), var);
|
||||
}
|
||||
|
||||
if (DECL_INITIAL (var)
|
||||
&& decl_constant_var_p (var))
|
||||
DECL_INITIAL (var) = cplus_expand_constant (DECL_INITIAL (var));
|
||||
|
||||
/* Remove this entry from the list. */
|
||||
incomplete_vars->unordered_remove (ix);
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user