------- Comment #41 from manu at gcc dot gnu dot org 2007-03-24 17:55 ------- (In reply to comment #38) > For comment #32 I get the failure but don't understand the problem; the regexp > matches the message, doesn't it? This doesn't seem any different from other > Fortran tests but it's the only one that fails; perhaps there's something > special about specifying the line number in the test directive, or that the > message comes from a file with a different name. I'll stare at it again > later.
No, it doesn't match. If you look closely to this message compared to other fortran messages: * Broken match: Warning: /home/manuel/src/trunk/gcc/testsuite/gfortran.dg/badline.f:2: file src/badline.F left but not entered * Correct match: /home/manuel/src/trunk/gcc/testsuite/gfortran.dg/blockdata_1.f90:17.7: common j ! { dg-warning "cannot contain blank COMMON" } 1 Warning: BLOCK DATA unit cannot contain blank COMMON at (1) The difference is that in the first case the filename plus position is between the "Warning:" and the message to match. Actually I think the deja-gnu or some *.exp file does some preprocessing of the output. For example, if you look at the output of gcc/testsuite/gfortran.dg/continuation_1.f90 /home/manuel/src/trunk/gcc/testsuite/gfortran.dg/continuation_1.f90:11.10: world!" ! { dg-warning "Warning: Missing '&' in continued character co 1 Warning: Missing '&' in continued character constant at (1) FAIL: gfortran.dg/continuation_1.f90 -O0 (test for warnings, line 11) FAIL: gfortran.dg/continuation_1.f90 -O0 (test for excess errors) Excess errors: /home/manuel/src/trunk/gcc/testsuite/gfortran.dg/continuation_1.f90:11: Warning: Missing '&' in continued character constant at (1) The message shown after "Excess errors" is slightly different than the original. I don't think that we should handle this corner case in our patch: either it is handled by whatever function preprocesses fortran output or the output itself is changed by the fortran front-end. We could as well use the original dg-warning / dg-error directives for fortran. So, gcc/testsuite/gcc.dg/20041213-1.c is the issue number 1 now. I think it should match without modifying the testcase. -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=25241