https://gcc.gnu.org/bugzilla/show_bug.cgi?id=100136
--- Comment #2 from anlauf at gcc dot gnu.org --- We do not properly handle the VALUE attribute. Reduced testcase: program p implicit none class(*), allocatable :: d call add_class (d) contains subroutine add_class (d) class(*), value :: d end subroutine end program