Dear Fortranners, while we detect invalid uses of type(*), we may run into other issues later when the declared variable is used, leading to an ICE due to a NULL pointer dereference. This is demonstrated by Gerhard's testcase. Steve and I came to rather similar fixes, see PR. Mine is attached. Regtested on x86_64-pc-linux-gnu. OK for mainline? Thanks, Harald