https://gcc.gnu.org/bugzilla/show_bug.cgi?id=93337

--- Comment #12 from anlauf at gcc dot gnu.org ---
The valgrind invalid read is possibly an issue with error recovery when
handling
the assignment.

Modifying the testcase:

program p
  type t
     character(:), allocatable :: a
  end type t
  class(t), allocatable :: y
  class(t) :: x ! { dg-error "must be dummy, allocatable or pointer" }
  y = x
end

one still gets the invalid read; swapping x and y in the assignment it
disappears.

Could you open a new PR to simplify tracking?

Reply via email to