https://gcc.gnu.org/bugzilla/show_bug.cgi?id=103606
G. Steinmetz <gs...@t-online.de> changed: What |Removed |Added ---------------------------------------------------------------------------- Keywords| |ice-on-invalid-code --- Comment #1 from G. Steinmetz <gs...@t-online.de> --- Adding this attribute yields a still invalid but non-ICE-ing code : $ cat z2.f90 program p type t end type contains elemental function f() result(z) class(t), allocatable :: z end end $ gfortran-12-20211205 -c z2.f90 z2.f90:5:35: 5 | elemental function f() result(z) | 1 Error: Function result variable 'z' at (1) of elemental function 'f' shall not have an ALLOCATABLE or POINTER attribute