https://gcc.gnu.org/bugzilla/show_bug.cgi?id=88364
Jakub Jelinek <jakub at gcc dot gnu.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Keywords|ice-on-valid-code |wrong-code CC| |tkoenig at gcc dot gnu.org Target Milestone|--- |9.0 --- Comment #1 from Jakub Jelinek <jakub at gcc dot gnu.org> --- Testcase (FAILs with -O2): module pr88364 implicit none type t integer :: b = -1 integer :: c = 2 end type t contains subroutine f1 (x) integer, intent(out) :: x x = 5 end subroutine f1 subroutine f2 () type(t) :: x call f1 (x%b) if (x%b .ne. 5 .or. x%c .ne. 2) stop 1 end subroutine f2 end module pr88364 use pr88364 call f2 end If t doesn't have c field, it would be ok to clobber whole x, even when we want to clobber just x%b, because x%b occupies all bits of x. Likely started with r264506 aka PR41453 fix.