From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 14731 invoked by alias); 22 Mar 2007 22:37:00 -0000 Received: (qmail 14679 invoked by uid 48); 22 Mar 2007 22:36:47 -0000 Date: Thu, 22 Mar 2007 22:37:00 -0000 Message-ID: <20070322223647.14678.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/msg02151.txt.bz2 ------- Comment #30 from manu at gcc dot gnu dot org 2007-03-22 22:36 ------- There is yet another strange behaviour of the current patch. For the testcase in gcc.dg/array-2.c: struct g g1 = { { 0, { } } }; struct g g2 = { { 0, { 1 } } }; /* { dg-error "(nested context)|(near initialization)" "nested" } */ struct h { int x[0]; int y; }; struct h h1 = { { 0 }, 1 }; /* { dg-error "(excess elements)|(near initialization)" "before end" } */ The output is: gcc.dg/array-2.c:10: error: initialization of flexible array member in a nested context gcc.dg/array-2.c:10: error: (near initialization for 'g2.f.x') gcc.dg/array-2.c:13: warning: excess elements in array initializer gcc.dg/array-2.c:13: warning: (near initialization for 'h1.x') And the test fails as follows: PASS: gcc.dg/array-2.c nested (test for errors, line 10) PASS: gcc.dg/array-2.c before end (test for errors, line 13) FAIL: gcc.dg/array-2.c (test for excess errors) Excess errors: /home/manuel/src/trunk/gcc/testsuite/gcc.dg/array-2.c:13: warning: excess elements in array initializer It seems that the second dg-error matched the wrong line. Perhaps it is getting confused by the alternatives. No idea. -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=25241