https://gcc.gnu.org/bugzilla/show_bug.cgi?id=107595
anlauf at gcc dot gnu.org changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |anlauf at gcc dot gnu.org --- Comment #6 from anlauf at gcc dot gnu.org --- Slight reduction of the testcase: program p type t integer, pointer :: b end type ! type(t) :: x = t(null()) ! OK type(t) x /t(null())/ ! ICE if (associated (x%b)) stop end Comparing the -fdump-fortran-original for both variants: @@ -15,7 +15,7 @@ result: associated symtree: 'null' || symbol: 'null' type spec : (INTEGER 4) - attributes: (PROCEDURE INTRINSIC-PROC FUNCTION IMPLICIT-TYPE ARRAY-OUTER-DEPENDENCY) + attributes: (PROCEDURE FUNCTION IMPLICIT-TYPE ARRAY-OUTER-DEPENDENCY) result: null symtree: 'p' || symbol: 'p' type spec : (UNKNOWN 0) @@ -27,8 +27,8 @@ result: t symtree: 'x' || symbol: 'x' type spec : (DERIVED t) - attributes: (VARIABLE IMPLICIT-SAVE) - value: t(NULL()) + attributes: (VARIABLE DATA) + value: t(null[()]) code: IF _gfortran_associated[[((p:x % b) ((arg not-present)))]] Are we just missing the resolution of NULL() in the failing case early enough?