aboutsummaryrefslogtreecommitdiff
path: root/gcc/tree.c
diff options
context:
space:
mode:
authorJakub Jelinek <jakub@redhat.com>2006-10-30 09:01:28 +0100
committerJakub Jelinek <jakub@gcc.gnu.org>2006-10-30 09:01:28 +0100
commitcc59abbf350bb3ada6b6255dd5f047b3c904d81d (patch)
tree7a07dff5c74eee4bffb4874c3fbefe85e870f507 /gcc/tree.c
parent5fbd2051394849190af02e40fe987839f7ef6eb9 (diff)
downloadgcc-cc59abbf350bb3ada6b6255dd5f047b3c904d81d.zip
gcc-cc59abbf350bb3ada6b6255dd5f047b3c904d81d.tar.gz
gcc-cc59abbf350bb3ada6b6255dd5f047b3c904d81d.tar.bz2
re PR tree-optimization/29637 (Endless recursion in make_vector_type)
PR tree-optimization/29637 * tree.c (make_vector_type): Don't recurse if TYPE_MAIN_VARIANT of the innertype is the innertype itself. * gcc.dg/pr29637.c: New test. From-SVN: r118175
Diffstat (limited to 'gcc/tree.c')
-rw-r--r--gcc/tree.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/gcc/tree.c b/gcc/tree.c
index 8f869fa..d0c56c4 100644
--- a/gcc/tree.c
+++ b/gcc/tree.c
@@ -6400,7 +6400,8 @@ make_vector_type (tree innertype, int nunits, enum machine_mode mode)
/* Build a main variant, based on the main variant of the inner type, then
use it to build the variant we return. */
- if (TYPE_ATTRIBUTES (innertype) || TYPE_QUALS (innertype))
+ if ((TYPE_ATTRIBUTES (innertype) || TYPE_QUALS (innertype))
+ && TYPE_MAIN_VARIANT (innertype) != innertype)
return build_type_attribute_qual_variant (
make_vector_type (TYPE_MAIN_VARIANT (innertype), nunits, mode),
TYPE_ATTRIBUTES (innertype),