https://gcc.gnu.org/bugzilla/show_bug.cgi?id=85878
Richard Biener <rguenth at gcc dot gnu.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Keywords| |ice-on-valid-code Priority|P3 |P2 Status|UNCONFIRMED |NEW Last reconfirmed| |2018-05-23 Component|fortran |middle-end Target Milestone|--- |6.5 Ever confirmed|0 |1 --- Comment #1 from Richard Biener <rguenth at gcc dot gnu.org> --- Looks like a middle-end issue to me. We expand MEM[(c_char * {ref-all})&transfer.2] = _23; where transfer.2 is expanded to (concat:SC (reg:SF 91 [ transfer.2 ]) (reg:SF 92 [ transfer.2+4 ]) and _23 is <ssa_name 0x7ffff6a66120 type <integer_type 0x7ffff68a8690 character(kind=4) public unsigned SI size <integer_cst 0x7ffff6894e28 constant 32> unit-size <integer_cst 0x7ffff6894e40 constant 4> align:32 warn_if_not_align:0 symtab:0 alias-set -1 canonical-type 0x7ffff68a8690 precision:32 min <integer_cst 0x7ffff6894e58 0> max <integer_cst 0x7ffff6894e10 4294967295> pointer_to_this <pointer_type 0x7ffff68b4690>> visited def_stmt _23 = VIEW_CONVERT_EXPR<character(kind=4)>(a_24(D)); version:23> and we call convert_move with (reg:SF 91 [ transfer.2 ]) (subreg:SI (reg/v:SF 90 [ a ]) 0) it might go wrong in expand_assignment which "loses" the punning on the LHS.