https://gcc.gnu.org/bugzilla/show_bug.cgi?id=101085
G. Steinmetz <gs...@t-online.de> changed: What |Removed |Added ---------------------------------------------------------------------------- Keywords| |ice-on-invalid-code --- Comment #1 from G. Steinmetz <gs...@t-online.de> --- $ cat z2.f90 program p type t integer :: n end type class(t), allocatable :: c(:) character(3) :: a(1) = ['abc'] c = [t(1)] if ( f(c, a) /= 1 ) stop 1 contains integer function f(x, y) class(t) :: x(:) class(*) :: y(size(x)) f = size(y) end end $ cat z3.f90 program p type t integer :: n end type class(t), allocatable :: c(:) integer :: a = 3 c = [t(1)] if ( f(c, a) /= 1 ) stop 1 contains integer function f(x, y) class(t) :: x(:) class(*) :: y(size(x)) f = size(y) end end $ gfortran-12-20210613 -c z2.f90 $ $ gfortran-12-20210613 -c z3.f90 z3.f90:8:13: 8 | if ( f(c, a) /= 1 ) stop 1 | 1 Error: Rank mismatch in argument 'y' at (1) (rank-1 and scalar)