http://gcc.gnu.org/bugzilla/show_bug.cgi?id=59906
--- Comment #7 from Harald Anlauf <anlauf at gmx dot de> --- (In reply to Paul Thomas from comment #4) > It would be very useful if you would try to compile it with > -ftree-dump-original and post the result around the scalarization loop for > ! Does not compile: > print*,str_cmp((/'aaa','bbb'/), str_aux) The diff between compiling and failing variant is: --- robin_gfortran_bug.f90.003t.original.compiles 2014-01-31 18:44:56.000000000 +0100 +++ robin_gfortran_bug.f90.003t.original.fails 2014-01-31 18:44:32.000000000 +0100 @@ -55,15 +55,15 @@ struct __st_parameter_dt dt_parm.0; dt_parm.0.common.filename = &"robin_gfortran_bug.f90"[1]{lb: 1 sz: 1}; - dt_parm.0.common.line = 14; + dt_parm.0.common.line = 17; dt_parm.0.common.flags = 128; dt_parm.0.common.unit = 6; _gfortran_st_write (&dt_parm.0); { - character(kind=1)[1:_str] & restrict D.2272; + character(kind=1) D.2272[1:.str_aux]; static character(kind=1)[1:3] * A.1[2] = {&"aaa"[1]{lb: 1 sz: 1}, &"bbb"[1]{lb: 1 sz: 1}}; - D.2272 = str; + D.2272 = str_aux; { integer(kind=4) S.2; @@ -74,7 +74,7 @@ { logical(kind=4) D.2274; - D.2274 = str_cmp (A.1[S.2], &D.2272, 3, _str); + D.2274 = str_cmp (A.1[S.2], &D.2272, 3, .str_aux); _gfortran_transfer_logical_write (&dt_parm.0, &D.2274, 4); } S.2 = S.2 + 1;