Fixed problem related to vec_ld in c++ mode.
authorFariborz Jahanian <fjahanian@apple.com>
Tue, 11 May 2004 20:28:12 +0000 (20:28 +0000)
committerFariborz Jahanian <fjahanian@gcc.gnu.org>
Tue, 11 May 2004 20:28:12 +0000 (20:28 +0000)
Approved by Aldy Hernandez.

From-SVN: r81715

gcc/ChangeLog
gcc/config/rs6000/rs6000.c

index 6a84fb677eb54885bd0618f4dc000a84b86975b9..e1f4cf0b060236f614aedada0b1a9c3064d9e6f1 100644 (file)
@@ -1,3 +1,8 @@
+2004-05-11  Fariborz Jahanian  <fjahanian@apple.com>
+
+       * config/rs6000/rs6000.c (rs6000_handle_altivec_attribute):
+       Add const qualifier to altivec vector type if one is needed.
+
 2004-05-11  Paul Brook  <paul@codesourcery.com>
 
        * flags.h (flag_short_enums): Update comment.
index e1a55e4a99ef0a88cc34592dd2a56a50eae33238..aaa93ecb00c8c8311681fa7b6ebbf2e969e34bb8 100644 (file)
@@ -15175,6 +15175,9 @@ rs6000_handle_altivec_attribute (tree *node, tree name, tree args,
     default: break;
     }
 
+  if (result && result != type && TYPE_READONLY (type))
+    result = build_qualified_type (result, TYPE_QUAL_CONST);
+
   *no_add_attrs = true;  /* No need to hang on to the attribute.  */
 
   if (!result)