OSDN Git Service

2012-02-01 Tristan Gingold <gingold@adacore.com>
authorgingold <gingold@138bc75d-0d04-0410-961f-82ee72b054a4>
Wed, 1 Feb 2012 08:49:11 +0000 (08:49 +0000)
committergingold <gingold@138bc75d-0d04-0410-961f-82ee72b054a4>
Wed, 1 Feb 2012 08:49:11 +0000 (08:49 +0000)
* c-typeck.c (composite_type): Keep mode for pointers.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@183791 138bc75d-0d04-0410-961f-82ee72b054a4

gcc/ChangeLog
gcc/c-typeck.c

index ef9fb3d..f2025eb 100644 (file)
@@ -1,3 +1,7 @@
+2012-02-01  Tristan Gingold  <gingold@adacore.com>
+
+       * c-typeck.c (composite_type): Keep mode for pointers.
+
 2012-01-31  Richard Sandiford  <rdsandiford@googlemail.com>
 
        * function.h (regno_reg_rtx): Adjust comment.
index b696e5e..2de1e5c 100644 (file)
@@ -394,7 +394,7 @@ composite_type (tree t1, tree t2)
        tree pointed_to_1 = TREE_TYPE (t1);
        tree pointed_to_2 = TREE_TYPE (t2);
        tree target = composite_type (pointed_to_1, pointed_to_2);
-       t1 = build_pointer_type (target);
+        t1 = build_pointer_type_for_mode (target, TYPE_MODE (t1), false);
        t1 = build_type_attribute_variant (t1, attributes);
        return qualify_type (t1, t2);
       }