From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 25623 invoked by alias); 24 Mar 2007 17:55:44 -0000 Received: (qmail 25518 invoked by uid 48); 24 Mar 2007 17:55:33 -0000 Date: Sat, 24 Mar 2007 17:55:00 -0000 Message-ID: <20070324175533.25517.qmail@sourceware.org> X-Bugzilla-Reason: CC References: Subject: [Bug testsuite/25241] DejaGNU does not distinguish between errors and warnings In-Reply-To: Reply-To: gcc-bugzilla@gcc.gnu.org To: gcc-bugs@gcc.gnu.org From: "manu at gcc dot gnu dot org" Mailing-List: contact gcc-bugs-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Archive: List-Post: List-Help: Sender: gcc-bugs-owner@gcc.gnu.org X-SW-Source: 2007-03/txt/msg02312.txt.bz2 ------- 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