https://gcc.gnu.org/bugzilla/show_bug.cgi?id=97589
--- Comment #3 from Thomas Koenig <tkoenig at gcc dot gnu.org> --- Simplified test case: program main type foo real, allocatable, dimension(:) :: a[:] end type foo type (foo) :: x sync all allocate (x%a(10)[*]) end program main