From: Richard Earnshaw Date: Wed, 6 Jul 1994 09:07:10 +0000 (+0000) Subject: (decl_attributes): If TREE_TYPE for the DECL is updated, X-Git-Tag: misc/cutover-egcs-0~6281 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=20250c072b934afe6194fdb4611e78f549465689;p=thirdparty%2Fgcc.git (decl_attributes): If TREE_TYPE for the DECL is updated, then update TYPE as well. From-SVN: r7662 --- diff --git a/gcc/c-common.c b/gcc/c-common.c index 920c73d26d99..f18c270b2794 100644 --- a/gcc/c-common.c +++ b/gcc/c-common.c @@ -232,7 +232,7 @@ decl_attributes (decl, attributes) TREE_THIS_VOLATILE (decl) = 1; else if (TREE_CODE (type) == POINTER_TYPE && TREE_CODE (TREE_TYPE (type)) == FUNCTION_TYPE) - TREE_TYPE (decl) + TREE_TYPE (decl) = type = build_pointer_type (build_type_variant (TREE_TYPE (type), TREE_READONLY (TREE_TYPE (type)), 1)); @@ -246,7 +246,7 @@ decl_attributes (decl, attributes) TREE_READONLY (decl) = 1; else if (TREE_CODE (type) == POINTER_TYPE && TREE_CODE (TREE_TYPE (type)) == FUNCTION_TYPE) - TREE_TYPE (decl) + TREE_TYPE (decl) = type = build_pointer_type (build_type_variant (TREE_TYPE (type), 1, TREE_THIS_VOLATILE (TREE_TYPE (type))));