> 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 <ja...@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