tree.c (valid_machine_attribute): If we're modifying the FUNCTION_TYPE within a POINT...
authorJason Merrill <jason@yorick.cygnus.com>
Fri, 16 Apr 1999 01:24:50 +0000 (01:24 +0000)
committerJason Merrill <jason@gcc.gnu.org>
Fri, 16 Apr 1999 01:24:50 +0000 (21:24 -0400)
* 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
gcc/tree.c

index 2d77e3e573c4b26000e06fb30419864cb4229831..0802010e79b3d3a484ec768d9af5fcef51114567 100644 (file)
@@ -1,3 +1,9 @@
+Fri Apr 16 01:23:47 1999  Jason Merrill  <jason@yorick.cygnus.com>
+
+       * 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 <hubicka@freesoft.cz>
 
        * i386.c (x86_adjust_cost): Move break statement to correct place.
index effc12115d78c4138df040f853b3338b8063258a..d2594208c8447b9624474de59bc561d941babbb7 100644 (file)
@@ -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;
     }