From 7958a2a62b15fc90a6fc8379902ea4a8f9dcbfba Mon Sep 17 00:00:00 2001 From: Fariborz Jahanian Date: Tue, 11 May 2004 20:28:12 +0000 Subject: [PATCH] Fixed problem related to vec_ld in c++ mode. Approved by Aldy Hernandez. From-SVN: r81715 --- gcc/ChangeLog | 5 +++++ gcc/config/rs6000/rs6000.c | 3 +++ 2 files changed, 8 insertions(+) diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 6a84fb677eb..e1f4cf0b060 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,8 @@ +2004-05-11 Fariborz Jahanian + + * config/rs6000/rs6000.c (rs6000_handle_altivec_attribute): + Add const qualifier to altivec vector type if one is needed. + 2004-05-11 Paul Brook * flags.h (flag_short_enums): Update comment. diff --git a/gcc/config/rs6000/rs6000.c b/gcc/config/rs6000/rs6000.c index e1a55e4a99e..aaa93ecb00c 100644 --- a/gcc/config/rs6000/rs6000.c +++ b/gcc/config/rs6000/rs6000.c @@ -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) -- 2.30.2