aboutsummaryrefslogtreecommitdiff
path: root/gcc/tree.c
diff options
context:
space:
mode:
authorRichard Guenther <rguenther@suse.de>2011-03-14 12:20:48 +0000
committerRichard Biener <rguenth@gcc.gnu.org>2011-03-14 12:20:48 +0000
commit7f4d6e1beb079e85cf99fc1f4df2e1732beda67c (patch)
treeeecb2902ac6eba928a764de20f2feb8d0e72be95 /gcc/tree.c
parentc6104ef1c3ce9c543dcc6b2c3b5c3aca04dcadad (diff)
downloadgcc-7f4d6e1beb079e85cf99fc1f4df2e1732beda67c.zip
gcc-7f4d6e1beb079e85cf99fc1f4df2e1732beda67c.tar.gz
gcc-7f4d6e1beb079e85cf99fc1f4df2e1732beda67c.tar.bz2
re PR tree-optimization/48098 (internal compiler error: in build_vector_from_val, at tree.c:1380)
2011-03-14 Richard Guenther <rguenther@suse.de> PR middle-end/48098 * tree.c (build_vector_from_val): Adjust assert to requirements and reality. * gcc.dg/torture/pr48098.c: New testcase. From-SVN: r170934
Diffstat (limited to 'gcc/tree.c')
-rw-r--r--gcc/tree.c10
1 files changed, 8 insertions, 2 deletions
diff --git a/gcc/tree.c b/gcc/tree.c
index be46990..405b549 100644
--- a/gcc/tree.c
+++ b/gcc/tree.c
@@ -1376,8 +1376,14 @@ build_vector_from_val (tree vectype, tree sc)
if (sc == error_mark_node)
return sc;
- gcc_assert (useless_type_conversion_p (TREE_TYPE (sc),
- TREE_TYPE (vectype)));
+ /* Verify that the vector type is suitable for SC. Note that there
+ is some inconsistency in the type-system with respect to restrict
+ qualifications of pointers. Vector types always have a main-variant
+ element type and the qualification is applied to the vector-type.
+ So TREE_TYPE (vector-type) does not return a properly qualified
+ vector element-type. */
+ gcc_checking_assert (types_compatible_p (TYPE_MAIN_VARIANT (TREE_TYPE (sc)),
+ TREE_TYPE (vectype)));
v = VEC_alloc (constructor_elt, gc, nunits);
for (i = 0; i < nunits; ++i)