This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug tree-optimization/48098] [4.6 Regression] internal compiler error: in build_vector_from_val, at tree.c:1380
- From: "jakub at gcc dot gnu.org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Mon, 14 Mar 2011 09:59:44 +0000
- Subject: [Bug tree-optimization/48098] [4.6 Regression] internal compiler error: in build_vector_from_val, at tree.c:1380
- Auto-submitted: auto-generated
- References: <bug-48098-4@http.gcc.gnu.org/bugzilla/>
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=48098
--- Comment #5 from Jakub Jelinek <jakub at gcc dot gnu.org> 2011-03-14 09:59:32 UTC ---
Just swapping the order of arguments to useless_type_conversion_p works too.
If we consider build_vector_from_val as conversion from sc's type to the inner
type of the vector, then vectype's inner type as outer_type needs to go first:
--- gcc/tree.c.jj 2011-03-11 12:16:39.000000000 +0100
+++ gcc/tree.c 2011-03-14 10:57:21.000000000 +0100
@@ -1376,8 +1376,8 @@ build_vector_from_val (tree vectype, tre
if (sc == error_mark_node)
return sc;
- gcc_assert (useless_type_conversion_p (TREE_TYPE (sc),
- TREE_TYPE (vectype)));
+ gcc_assert (useless_type_conversion_p (TREE_TYPE (vectype),
+ TREE_TYPE (sc)));
v = VEC_alloc (constructor_elt, gc, nunits);
for (i = 0; i < nunits; ++i)