From ace3c40a1fa95d3ef2b8607344e065fbf981c4c4 Mon Sep 17 00:00:00 2001 From: Jason Merrill Date: Fri, 16 Apr 1999 01:24:50 +0000 Subject: [PATCH] tree.c (valid_machine_attribute): If we're modifying the FUNCTION_TYPE within a POINTER_TYPE and we don't get a... * tree.c (valid_machine_attribute): If we're modifying the FUNCTION_TYPE within a POINTER_TYPE and we don't get a decl, update the POINTER_TYPE. From-SVN: r26489 --- gcc/ChangeLog | 6 ++++++ gcc/tree.c | 7 +++++++ 2 files changed, 13 insertions(+) diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 2d77e3e573c..0802010e79b 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,9 @@ +Fri Apr 16 01:23:47 1999 Jason Merrill + + * tree.c (valid_machine_attribute): If we're modifying the + FUNCTION_TYPE within a POINTER_TYPE and we don't get a decl, + update the POINTER_TYPE. + Fri Apr 16 00:19:31 1999 Jan Hubicka * i386.c (x86_adjust_cost): Move break statement to correct place. diff --git a/gcc/tree.c b/gcc/tree.c index effc12115d7..d2594208c84 100644 --- a/gcc/tree.c +++ b/gcc/tree.c @@ -3439,6 +3439,13 @@ valid_machine_attribute (attr_name, attr_args, decl, type) if (decl != 0) TREE_TYPE (decl) = build_pointer_type (inner_type); + else + { + /* Clear TYPE_POINTER_TO for the old inner type, since + `type' won't be pointing to it anymore. */ + TYPE_POINTER_TO (TREE_TYPE (type)) = NULL_TREE; + TREE_TYPE (type) = inner_type; + } validated = 1; }