Commit ca06cfe6 by Richard Henderson Committed by Richard Henderson

re PR c++/10202 ([IA64] ICE in int_mode_for_mode, at stor-layout.c)

        PR c++/10202
        * expr.c (expand_expr): Use COMPLETE_OR_UNBOUND_ARRAY_TYPE_P
        not COMPLETE_TYPE_P for re-invoking layout_decl.
	* g++.dg/expr/incomplete1.C: New.

From-SVN: r65484
parent d2d42a91
2003-04-11 Richard Henderson <rth@redhat.com>
PR c++/10202
* expr.c (expand_expr): Use COMPLETE_OR_UNBOUND_ARRAY_TYPE_P
not COMPLETE_TYPE_P for re-invoking layout_decl.
2003-04-11 Simon Law <sfllaw@engmail.uwaterloo.ca>
* doc/bugreport.texi: Fix paragraph breaking between sections
......
......@@ -6712,7 +6712,8 @@ expand_expr (exp, target, tmode, modifier)
case VAR_DECL:
/* If a static var's type was incomplete when the decl was written,
but the type is complete now, lay out the decl now. */
if (DECL_SIZE (exp) == 0 && COMPLETE_TYPE_P (TREE_TYPE (exp))
if (DECL_SIZE (exp) == 0
&& COMPLETE_OR_UNBOUND_ARRAY_TYPE_P (TREE_TYPE (exp))
&& (TREE_STATIC (exp) || DECL_EXTERNAL (exp)))
layout_decl (exp, 0);
......
// PR 10202
// { dg-do compile }
// { dg-options -O0 }
extern struct _smtp_account smtp_accounts[];
typedef struct _smtp_account {
int flags;
} Smtp_Account;
void get_smtp_host_info ()
{
if (smtp_accounts[0].flags & 0x01)
get_smtp_host_info();
}
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