Fixed problem related to vec_ld in c++ mode.
authorfjahanian <fjahanian@138bc75d-0d04-0410-961f-82ee72b054a4>
Tue, 11 May 2004 20:28:12 +0000 (20:28 +0000)
committerfjahanian <fjahanian@138bc75d-0d04-0410-961f-82ee72b054a4>
Tue, 11 May 2004 20:28:12 +0000 (20:28 +0000)
Approved by Aldy Hernandez.

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

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

index 6a84fb6..e1f4cf0 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 e1a55e4..aaa93ec 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)