diff options
author | Ulrich Weigand <uweigand@de.ibm.com> | 2008-08-25 18:51:24 +0000 |
---|---|---|
committer | Ulrich Weigand <uweigand@gcc.gnu.org> | 2008-08-25 18:51:24 +0000 |
commit | 4f538d42772a6089366a80d20fac26905bcd6749 (patch) | |
tree | 0c8d6fa225b5a087485b84d3c70bbee0d5ddf539 /gcc | |
parent | 7cede6436921a2f1cc7d93abf2fc2cf96796d4c2 (diff) | |
download | gcc-4f538d42772a6089366a80d20fac26905bcd6749.tar.gz |
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 <andrew_pinski@playstation.sony.com>
From-SVN: r139569
Diffstat (limited to 'gcc')
-rw-r--r-- | gcc/ChangeLog | 5 | ||||
-rw-r--r-- | gcc/config/rs6000/rs6000.c | 6 | ||||
-rw-r--r-- | gcc/testsuite/ChangeLog | 5 |
3 files changed, 14 insertions, 2 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog index be61419dcd7..bd4b67bfa23 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,8 @@ +2008-08-25 Ulrich Weigand <Ulrich.Weigand@de.ibm.com> + + * config/rs6000/rs6000.c (rs6000_handle_altivec_attribute): Propagate + all type qualifiers from element type to vector type. + 2008-08-25 David Daney <ddaney@avtrex.com> * 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 0f2779e54bf..79ca119bd5f 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 4406270be78..f2202f4702c 100644 --- a/gcc/testsuite/ChangeLog +++ b/gcc/testsuite/ChangeLog @@ -1,3 +1,8 @@ +2008-08-25 Ulrich Weigand <Ulrich.Weigand@de.ibm.com> + Andrew Pinski <andrew_pinski@playstation.sony.com> + + * gcc.target/powerpc/altivec-volatile.c: New test. + 2008-08-25 Daniel Kraft <d@domob.eu> * gfortran.dg/extends_7.f03: New test. |