https://gcc.gnu.org/bugzilla/show_bug.cgi?id=71862
--- Comment #6 from Dominique d'Humieres <dominiq at lps dot ens.fr> --- The patch for class.c in comment 2 fixes the ICE for the first test in comment0. The patch for resolve.c changes the error message and the tests allocate_class_1.f90 allocate_class_2.f90 class_2.f03 class_20.f03 class_20.f03 class_38.f03 class_39.f03 class_53.f90 class_8.f03 coarray_poly_3.f90 pointer_2.f90 select_type_25.f90 typebound_call_24.f03 unlimited_polymorphic_9.f90 have to be updated. IMO it doesn't worth the trouble. I think the first test in comment 5 is invalid: it tries to use an unallocated variable. If I add a line allocating 'z', then the test behaves as the one in comment 1.