https://gcc.gnu.org/bugzilla/show_bug.cgi?id=107721

--- Comment #19 from anlauf at gcc dot gnu.org ---
(In reply to Christopher Albert from comment #18)
> Created attachment 62909 [details]
> Next try
> 
> How about this solution?

Yes this appears to be very close... ;-)
(And it is well readable.)

I am sorry to torture you further, but here's another mean case with
nested constructors which loses the typespec:

  print *,        [ character(16) :: ['a','b']  ]
  print *,        [ character(16) :: ['a','b']  ] // "|"
  print *,        [[character(16) :: ['a','b'] ]]        ! lost typespec
  print *,        [[character(16) :: ['a','b'] ]] // "|" ! lost typespec
  print *, "|" // [[character(16) :: ['a','b'] ]]        ! lost typespec
end

  code:
  WRITE UNIT=6 FMT=-1
  TRANSFER (/ 'a               ' , 'b               ' /)
  DT_END
  WRITE UNIT=6 FMT=-1
  TRANSFER (/ 'a               |' , 'b               |' /)
  DT_END
  WRITE UNIT=6 FMT=-1
  TRANSFER (/ 'a               ' , 'b' /)
  DT_END
  WRITE UNIT=6 FMT=-1
  TRANSFER (/ 'a               |' , 'b|' /)
  DT_END
  WRITE UNIT=6 FMT=-1
  TRANSFER (/ '|a               ' , '|b' /)
  DT_END

Reply via email to