PR c++/22494
authorsayle <sayle@138bc75d-0d04-0410-961f-82ee72b054a4>
Thu, 30 Mar 2006 01:35:22 +0000 (01:35 +0000)
committersayle <sayle@138bc75d-0d04-0410-961f-82ee72b054a4>
Thu, 30 Mar 2006 01:35:22 +0000 (01:35 +0000)
* init.c (build_vec_delete_1): Convert BASE pointer's type to
the base pointer type to avoid a type mismatch in the EQ_EXPR.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@112529 138bc75d-0d04-0410-961f-82ee72b054a4

gcc/cp/ChangeLog
gcc/cp/init.c

index f154edc..67de4f7 100644 (file)
@@ -1,3 +1,9 @@
+2006-03-29  Roger Sayle  <roger@eyesopen.com>
+
+       PR c++/22494
+       * init.c (build_vec_delete_1): Convert BASE pointer's type to
+       the base pointer type to avoid a type mismatch in the EQ_EXPR.
+
 2006-03-24  Carlos O'Donell  <carlos@codesourcery.com>
 
        * search.c (maybe_suppress_debug_info): If
index 6a7e625..194b29b 100644 (file)
@@ -2212,7 +2212,8 @@ build_vec_delete_1 (tree base, tree maxindex, tree type,
   TREE_SIDE_EFFECTS (controller) = 1;
 
   body = build1 (EXIT_EXPR, void_type_node,
-                build2 (EQ_EXPR, boolean_type_node, base, tbase));
+                build2 (EQ_EXPR, boolean_type_node, tbase,
+                        fold_convert (ptype, base)));
   body = build_compound_expr
     (body, build_modify_expr (tbase, NOP_EXPR,
                              build2 (MINUS_EXPR, ptype, tbase, size_exp)));