From: bje Date: Fri, 17 Aug 2007 05:24:24 +0000 (+0000) Subject: PR middle-end/32970 X-Git-Tag: upstream/4.9.2~46841 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=e3c15b04f6622c310294816d89fc4664323fb0b3;p=platform%2Fupstream%2Flinaro-gcc.git PR middle-end/32970 gcc/ * tree.c (reconstruct_complex_type): For a pointer to a vector, use build_qualified_type to retain qualifiers of the base type. testsuite/ * g++.dg/ext/altivec-14.C: New test. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@127578 138bc75d-0d04-0410-961f-82ee72b054a4 --- diff --git a/gcc/ChangeLog b/gcc/ChangeLog index c729337..e077c2e 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,4 +1,12 @@ +2007-08-17 Sa Liu + Ulrich Weigand + + PR middle-end/32970 + * tree.c (reconstruct_complex_type): For a pointer to a vector, + use build_qualified_type to retain qualifiers of the base type. + 2007-08-17 Chen Liqin + * config/score/score.md : Update pattern tablejump. * config/score/score.c : Update score_initialize_trampoline function. diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog index 0da0134..b8f5839 100644 --- a/gcc/testsuite/ChangeLog +++ b/gcc/testsuite/ChangeLog @@ -1,3 +1,8 @@ +2007-08-17 Ben Elliston + + PR middle-end/32970 + * g++.dg/ext/altivec-14.C: New test. + 2007-08-16 Uros Bizjak * gcc.dg/tree-ssa/ssa-dse-10.c: Clean up all dse dump files. diff --git a/gcc/testsuite/g++.dg/ext/altivec-14.C b/gcc/testsuite/g++.dg/ext/altivec-14.C new file mode 100644 index 0000000..e5dd81c --- /dev/null +++ b/gcc/testsuite/g++.dg/ext/altivec-14.C @@ -0,0 +1,13 @@ +/* { dg-do compile { target powerpc*-*-* } } */ +/* { dg-require-effective-target powerpc_altivec_ok } */ +/* { dg-options "-maltivec" } */ + +void f (__attribute__((altivec (vector__))) signed int * a, + __attribute__((altivec (vector__))) signed int * const b); + +int +foo (void) +{ + __attribute__((altivec (vector__))) signed int a[1], b[1]; + f (a, b); +} diff --git a/gcc/tree.c b/gcc/tree.c index 92d2ba8..b6b339c 100644 --- a/gcc/tree.c +++ b/gcc/tree.c @@ -7609,10 +7609,7 @@ reconstruct_complex_type (tree type, tree bottom) else return bottom; - TYPE_READONLY (outer) = TYPE_READONLY (type); - TYPE_VOLATILE (outer) = TYPE_VOLATILE (type); - - return outer; + return build_qualified_type (outer, TYPE_QUALS (type)); } /* Returns a vector tree node given a mode (integer, vector, or BLKmode) and