From: Roger Sayle Date: Thu, 30 Mar 2006 01:35:22 +0000 (+0000) Subject: re PR c++/22494 (C++ front-end produces mis-match types in EQ_EXPR (array deconstructor)) X-Git-Tag: releases/gcc-4.2.0~3495 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=5cd88d6857dffe4f10c834c773c300881ec20e32;p=thirdparty%2Fgcc.git re PR c++/22494 (C++ front-end produces mis-match types in EQ_EXPR (array deconstructor)) 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 --- diff --git a/gcc/cp/ChangeLog b/gcc/cp/ChangeLog index f154edcf6025..67de4f7f61e2 100644 --- a/gcc/cp/ChangeLog +++ b/gcc/cp/ChangeLog @@ -1,3 +1,9 @@ +2006-03-29 Roger Sayle + + 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 * search.c (maybe_suppress_debug_info): If diff --git a/gcc/cp/init.c b/gcc/cp/init.c index 6a7e625a00f2..194b29baea8a 100644 --- a/gcc/cp/init.c +++ b/gcc/cp/init.c @@ -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)));