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

--- Comment #17 from anlauf at gcc dot gnu.org ---
(In reply to Christopher Albert from comment #16)
> Thanks again! Please check the new patch.

I tried it, and it works for the cases presented.  So far so good.

However, it still fails for me for the following indicated variations:

  print *, "|" // [ character(16) ::  'a' // 'c',  'b' // 'de'  ]  ! OK
  print *, "|" // [ character(16) ::  'a' // 'c', ('b' // 'de') ]  ! fail
  print *, "|" // [ character(16) :: ('a' // 'c'), 'b' // 'de'  ]  ! fail

Furthermore, I am a little concerned about the complexity of the approach.
One would hope that one could reuse existing simplification procedures,
which already (should?) handle the recursive nature of the work including
parentheses, at least as much as possible.

(I hit an independent issue with simplification of string concatenation,
an operation which is exactly associative, and will open a related PR).

Reply via email to