]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
re PR c++/22494 (C++ front-end produces mis-match types in EQ_EXPR (array deconstructor))
authorRoger Sayle <roger@eyesopen.com>
Thu, 30 Mar 2006 01:35:22 +0000 (01:35 +0000)
committerRoger Sayle <sayle@gcc.gnu.org>
Thu, 30 Mar 2006 01:35:22 +0000 (01:35 +0000)
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.

From-SVN: r112529

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

index f154edcf6025720ee9208f07f53ffc8c4588f1b9..67de4f7f61e2717e1cf268257813b8211fd4da85 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 6a7e625a00f28d8d7da8d817e4c7a94ccaf11739..194b29baea8afc3372f918f9d7cc6281c09ae3a7 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)));