This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: Do not use TYPE_CANONICAL in useless_type_conversion
- From: Eric Botcazou <ebotcazou at adacore dot com>
- To: gcc-patches at gcc dot gnu dot org, Jan Hubicka <hubicka at ucw dot cz>
- Cc: Richard Biener <rguenther at suse dot de>, law at redhat dot com
- Date: Fri, 02 Oct 2015 23:15:17 +0200
- Subject: Re: Do not use TYPE_CANONICAL in useless_type_conversion
- Authentication-results: sourceware.org; auth=none
- References: <20150930211235 dot GB30640 at kam dot mff dot cuni dot cz> <20151002160245 dot GA84720 at kam dot mff dot cuni dot cz> <20151002180022 dot GA32564 at kam dot mff dot cuni dot cz>
> Index: expr.c
> ===================================================================
> --- expr.c (revision 228267)
> +++ expr.c (working copy)
> @@ -5462,7 +5462,12 @@ store_expr_with_bounds (tree exp, rtx ta
> {
> if (GET_MODE (temp) != GET_MODE (target) && GET_MODE (temp) !=
> VOIDmode) {
> - if (GET_MODE (target) == BLKmode)
> + if (GET_MODE (temp) == BLKmode && GET_MODE (target) != BLKmode)
> + {
> + gcc_assert (AGGREGATE_TYPE_P (TREE_TYPE (exp)));
> + temp = simplify_gen_subreg (GET_MODE (target), temp, BLKmode, 0);
> + }
Are you really trying to create a SUBREG with BLKmode here?
--
Eric Botcazou