From: Ulrich Weigand Date: Mon, 25 Aug 2008 18:51:24 +0000 (+0000) Subject: rs6000.c (rs6000_handle_altivec_attribute): Propagate all type qualifiers from elemen... X-Git-Tag: releases/gcc-4.4.0~2882 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=4f538d42772a6089366a80d20fac26905bcd6749;p=thirdparty%2Fgcc.git rs6000.c (rs6000_handle_altivec_attribute): Propagate all type qualifiers from element type to vector type. ChangeLog: * config/rs6000/rs6000.c (rs6000_handle_altivec_attribute): Propagate all type qualifiers from element type to vector type. testsuite/ChangeLog: * gcc.target/powerpc/altivec-volatile.c: New test. Co-Authored-By: Andrew Pinski From-SVN: r139569 --- diff --git a/gcc/ChangeLog b/gcc/ChangeLog index be61419dcd73..bd4b67bfa231 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,8 @@ +2008-08-25 Ulrich Weigand + + * config/rs6000/rs6000.c (rs6000_handle_altivec_attribute): Propagate + all type qualifiers from element type to vector type. + 2008-08-25 David Daney * config/mips/mips.md (immediate_insn): Move up in file, fix diff --git a/gcc/config/rs6000/rs6000.c b/gcc/config/rs6000/rs6000.c index 0f2779e54bf0..79ca119bd5fa 100644 --- a/gcc/config/rs6000/rs6000.c +++ b/gcc/config/rs6000/rs6000.c @@ -20294,8 +20294,10 @@ rs6000_handle_altivec_attribute (tree *node, default: break; } - if (result && result != type && TYPE_READONLY (type)) - result = build_qualified_type (result, TYPE_QUAL_CONST); + /* Propagate qualifiers attached to the element type + onto the vector type. */ + if (result && result != type && TYPE_QUALS (type)) + result = build_qualified_type (result, TYPE_QUALS (type)); *no_add_attrs = true; /* No need to hang on to the attribute. */ diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog index 4406270be782..f2202f4702cd 100644 --- a/gcc/testsuite/ChangeLog +++ b/gcc/testsuite/ChangeLog @@ -1,3 +1,8 @@ +2008-08-25 Ulrich Weigand + Andrew Pinski + + * gcc.target/powerpc/altivec-volatile.c: New test. + 2008-08-25 Daniel Kraft * gfortran.dg/extends_7.f03: New test.