[PATCH] PR fortran/104573 - ICE in resolve_structure_cons, at fortran/resolve.cc:1299

2022-02-16 Thread Harald Anlauf via Gcc-patches
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.

*Ping* [PATCH] PR fortran/104573 - ICE in resolve_structure_cons, at fortran/resolve.cc:1299

2022-02-23 Thread Harald Anlauf via Gcc-patches
Am 16.02.22 um 22:20 schrieb Harald Anlauf via Gcc-patches: 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 a

Re: [PATCH] PR fortran/104573 - ICE in resolve_structure_cons, at fortran/resolve.cc:1299

2022-02-28 Thread Mikael Morin
Le 16/02/2022 à 22:20, Harald Anlauf via Fortran a écrit : 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 an

Re: [PATCH] PR fortran/104573 - ICE in resolve_structure_cons, at fortran/resolve.cc:1299

2022-02-28 Thread Mikael Morin
Le 28/02/2022 à 22:32, Mikael Morin a écrit : So please use a condition on expr->ts.type instead. I said «instead», but «as well» is more appropriate; both expr.ts.type and expr.ts.u.derived conditions are probably necessary.