re PR middle-end/85878 (ICE in convert_mode_scalar, at expr.c:287)
authorJakub Jelinek <jakub@redhat.com>
Fri, 15 Jun 2018 20:36:38 +0000 (22:36 +0200)
committerJakub Jelinek <jakub@gcc.gnu.org>
Fri, 15 Jun 2018 20:36:38 +0000 (22:36 +0200)
commitda8ea71e3733ba9c5f70a84cea9cafea6b0126b0
treec9666afbacc9e91f2ba218c44d66904e891c37cb
parentfe7a23a611df9954918f334f855935ce228c88d6
re PR middle-end/85878 (ICE in convert_mode_scalar, at expr.c:287)

PR middle-end/85878
* expr.c (expand_assignment): Remove now redundant COMPLEX_MODE_P
check from first store_expr, use to_mode instead of GET_MODE (to_rtx).
Only call store_expr for halves if the mode is the same.

* gfortran.fortran-torture/compile/pr85878.f90: New test.

From-SVN: r261659
gcc/ChangeLog
gcc/expr.c
gcc/testsuite/ChangeLog
gcc/testsuite/gfortran.fortran-torture/compile/pr85878.f90 [new file with mode: 0644]