gfortran.dg/io_constraints_2.f90 issues an error on line 33 instead of a warning, but it still PASSES.
Are you saying that it matches the message text emitted and thinks its OK, but does not recognize that it was an error vs a warning?
I think this is a known issue.
There might be a bug about GCC testsuite also.
(In reply to comment #2)
> There might be a bug about GCC testsuite also.
And there is PR 25241.
I think this is fixed by now ( see PR47750 )?
fixed via PR47750
*** This bug has been marked as a duplicate of bug 47750 ***