From 3045eb55e398978089349e21d4136415b0cc8709 Mon Sep 17 00:00:00 2001 From: Jakub Jelinek Date: Sat, 19 Feb 2005 00:20:00 +0100 Subject: [PATCH] decl.c (start_decl_1): Only check TYPE_NEEDS_CONSTRUCTING if type is not error_mark_node. * decl.c (start_decl_1): Only check TYPE_NEEDS_CONSTRUCTING if type is not error_mark_node. From-SVN: r95241 --- gcc/cp/ChangeLog | 5 +++++ gcc/cp/decl.c | 2 +- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/gcc/cp/ChangeLog b/gcc/cp/ChangeLog index ab452e996db..7dbd13b8763 100644 --- a/gcc/cp/ChangeLog +++ b/gcc/cp/ChangeLog @@ -1,3 +1,8 @@ +2005-01-19 Jakub Jelinek + + * decl.c (start_decl_1): Only check TYPE_NEEDS_CONSTRUCTING + if type is not error_mark_node. + 2005-01-20 Giovanni Bajo PR c++/19508 diff --git a/gcc/cp/decl.c b/gcc/cp/decl.c index 4f1aa1ffb94..2f6b98f4255 100644 --- a/gcc/cp/decl.c +++ b/gcc/cp/decl.c @@ -3829,7 +3829,7 @@ start_decl_1 (tree decl) so we need to be conservative and unset TREE_READONLY for types with constructors. Otherwise aliasing code will ignore stores in an inline constructor. */ - if (TYPE_NEEDS_CONSTRUCTING (type)) + if (type != error_mark_node && TYPE_NEEDS_CONSTRUCTING (type)) TREE_READONLY (decl) = 0; } -- 2.30.2