https://gcc.gnu.org/bugzilla/show_bug.cgi?id=127730
--- Comment #2 from Ivan Pribec <ivan.pribec at gmail dot com> ---
I have a found a few more issues with associate when used in combination with
select type, so cases such as,
associate(a => f())
select type(a)
! ...
end select
end associate
The use of type parameter inquiry, complex-part designators, or derived type
components will trigger an ICE.
Some errors are avoided if a variable is used instead of an expression:
tmp => f()
associate (a => tmp)
! ...
end associate
But not in all cases (e.g. here:
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=127731, it doesn't work).