We have been trying to get rid of old-style constructs, declarations and non-standard features in our code, using compiler options. I was surprised to see that neither Intel Fortran oneAPI or gfortran flag the declaration for variable string2 in this little program. They both flag the declaration of string1.
program chkchar
implicit none
character*20 :: string1
character :: string2*20
string1 = '1 '
string2 = '2 '
write(*,*) string1, string2
end program chkchar
Is there a reason this is not flagged, for instance, this form is not marked as obsolescent?