This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [PATCH] Fix COMPONENT_REF expansion (PR rtl-optimization/77919)
- From: Eric Botcazou <ebotcazou at adacore dot com>
- To: Jakub Jelinek <jakub at redhat dot com>
- Cc: gcc-patches at gcc dot gnu dot org, Richard Biener <rguenther at suse dot de>
- Date: Fri, 28 Oct 2016 09:15:07 +0200
- Subject: Re: [PATCH] Fix COMPONENT_REF expansion (PR rtl-optimization/77919)
- Authentication-results: sourceware.org; auth=none
- References: <20161027193422.GR3541@tucnak.redhat.com>
> Though, perhaps COMPLEX_MODE_P (mode1) is also wrong, if mode1 isn't
> GET_MODE (op0), then we still will return something with unexpected mode
> (e.g. DCmode vs. CDImode); I wonder if for such mismatches we shouldn't
> just force_reg (convert_modes ()) each CONCAT operand separately and
> create a new CONCAT. Do we have a guarantee that COMPLEX_MODE_P (GET_MODE
> (op0)) if op0 is CONCAT?
In practice, at this point of the pipeline, I'd think so.
> 2016-10-27 Jakub Jelinek <jakub@redhat.com>
>
> PR rtl-optimization/77919
> * expr.c (expand_expr_real_1) <normal_inner_ref>: Force CONCAT into
> MEM if mode1 is not a complex mode.
>
> * g++.dg/torture/pr77919.C: New test.
I think that's OK.
--
Eric Botcazou