http://gcc.gnu.org/bugzilla/show_bug.cgi?id=44978
--- Comment #20 from Dominique d'Humieres <dominiq at lps dot ens.fr> --- I have run my tests with the patch in comment #17. As expected it fixes pr58023#c1, but it also remove the duplicate error in pr43591.f90 and pr43591.f90:15.55: integer, dimension(physical%number_particles_out(), & 1 Error: Expression at (1) must be of INTEGER type, found UNKNOWN I am a little bit puzzled by this error. I think it is an attempt to emit if for physical%number_flavor_states(), but the error does not give the right locus (probably due to the continuation line). I don't understand why it is removed by the change and don't know how bad it is to remove it. My analysis for pr48095 has been to fast: there is no duplicate, but two different errors: pr48095.f90:7.79: procedure(get_area), pointer, pass(this) :: get_special_area => get_my_area 1 Error: Interface mismatch in procedure pointer assignment at (1): Type mismatch in argument 'this' (CLASS(rectangle)/TYPE(rectangle)) pr48095.f90:7.79: procedure(get_area), pointer, pass(this) :: get_special_area => get_my_area 1 Error: Interface mismatch for procedure-pointer component 'get_special_area' in structure constructor at (1): Type mismatch in argument 'this' (CLASS(rectangle)/TYPE(rectangle)) The locus for the second error should probably at the end of get_special_area. With the Mikael's patch + the change in comment #17, I have spotted two remaining duplicates: the test in comment #4 and gfortran.dg/spec_expr_6.f90. Indeed I have probably overlooked other cases (I have no idea on how to do an exhaustive search).