https://gcc.gnu.org/bugzilla/show_bug.cgi?id=119443
--- Comment #3 from Jakub Jelinek <jakub at gcc dot gnu.org> --- If you expect a dg-output-file comparison failure but not that the program actually succeeds with 0 exit status, it should be *> { dg-do run } *> { dg-output-file "ofile-fail.expected" { xfail *-*-* } } BTW, I think it would be better to find some shorter file extension for the expected outputs, perhaps *.out (*.exp would be wrong, that is already used for dejagnu/expect stuff and *.expected is way too long).