From patchwork Tue Dec 12 13:18:53 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Rainer Orth X-Patchwork-Id: 847494 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (mailfrom) smtp.mailfrom=gcc.gnu.org (client-ip=209.132.180.131; helo=sourceware.org; envelope-from=gcc-patches-return-469023-incoming=patchwork.ozlabs.org@gcc.gnu.org; receiver=) Authentication-Results: ozlabs.org; dkim=pass (1024-bit key; unprotected) header.d=gcc.gnu.org header.i=@gcc.gnu.org header.b="yZ0Zk4o1"; dkim-atps=neutral Received: from sourceware.org (server1.sourceware.org [209.132.180.131]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 3yx0lx1m3jz9s9Y for ; Wed, 13 Dec 2017 00:19:22 +1100 (AEDT) DomainKey-Signature: a=rsa-sha1; c=nofws; d=gcc.gnu.org; h=list-id :list-unsubscribe:list-archive:list-post:list-help:sender:from :to:cc:subject:date:message-id:mime-version:content-type; q=dns; s=default; b=MWAc635O+8tfwH9lZuOUquSdXx7yerCWnZvkOcvjFGncM0+bem vu4+ai7pudBoFwgEIRwUAfcq0xVIhCri15p9med97lvb+ySad/cccCTtdSCwcM2w qXYMJH8oO4cnfjr81Wml0SF7P840ZrTDEQFzyqZlXPEZ6ueeUmAkn4tO8= DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=gcc.gnu.org; h=list-id :list-unsubscribe:list-archive:list-post:list-help:sender:from :to:cc:subject:date:message-id:mime-version:content-type; s= default; bh=mGfLKc2JX1xxaqa1sgH+Cnh1uFE=; b=yZ0Zk4o1guardRv2e4w5 /S0s/g6PGi6veiB0/19SOVtc6XgZ9X/ZAw8JFY0k8vVeViH0WZRWq1/2vFTZQI+K ELFL5+9uZ8VPwu46KC1yCqsqCxKpfRpbTHKvBON3ymYhdXpf2ZPYIIl3rOalW/jW 1ir+0qv/+jzO9H7V5qQTU4k= Received: (qmail 97224 invoked by alias); 12 Dec 2017 13:19:11 -0000 Mailing-List: contact gcc-patches-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Unsubscribe: List-Archive: List-Post: List-Help: Sender: gcc-patches-owner@gcc.gnu.org Delivered-To: mailing list gcc-patches@gcc.gnu.org Received: (qmail 96263 invoked by uid 89); 12 Dec 2017 13:19:10 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-24.5 required=5.0 tests=AWL, BAYES_00, GIT_PATCH_0, GIT_PATCH_1, GIT_PATCH_2, GIT_PATCH_3, KAM_LAZY_DOMAIN_SECURITY, KAM_SHORT, T_RP_MATCHES_RCVD autolearn=ham version=3.3.2 spammy=H*Ad:D*comcast.net X-HELO: smtp.CeBiTec.Uni-Bielefeld.DE Received: from smtp.CeBiTec.Uni-Bielefeld.DE (HELO smtp.CeBiTec.Uni-Bielefeld.DE) (129.70.160.84) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Tue, 12 Dec 2017 13:19:07 +0000 Received: from localhost (localhost.CeBiTec.Uni-Bielefeld.DE [127.0.0.1]) by smtp.CeBiTec.Uni-Bielefeld.DE (Postfix) with ESMTP id 0B56E97D; Tue, 12 Dec 2017 14:18:59 +0100 (CET) Received: from smtp.CeBiTec.Uni-Bielefeld.DE ([127.0.0.1]) by localhost (malfoy.CeBiTec.Uni-Bielefeld.DE [127.0.0.1]) (amavisd-new, port 10024) with LMTP id A-pvu-qcnH7B; Tue, 12 Dec 2017 14:18:56 +0100 (CET) Received: from lokon.CeBiTec.Uni-Bielefeld.DE (lokon.CeBiTec.Uni-Bielefeld.DE [129.70.161.152]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by smtp.CeBiTec.Uni-Bielefeld.DE (Postfix) with ESMTPS id 3C78297C; Tue, 12 Dec 2017 14:18:56 +0100 (CET) Received: (from ro@localhost) by lokon.CeBiTec.Uni-Bielefeld.DE (8.15.2+Sun/8.15.2/Submit) id vBCDIrWm014817; Tue, 12 Dec 2017 14:18:53 +0100 (MET) From: Rainer Orth To: gcc-patches@gcc.gnu.org Cc: Mike Stump , Nathan Sidwell Subject: [testsuite] Fix g++.old-deja/g++.pt/const2.C on Solaris Date: Tue, 12 Dec 2017 14:18:53 +0100 Message-ID: User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/25.1 (usg-unix-v) MIME-Version: 1.0 X-IsSubscribed: yes Between 20171112 (r254663) and 20171113 (r254700) a testcase regressed on Solaris (32 and 64-bit, sparc and x86): +FAIL: g++.old-deja/g++.pt/const2.C -std=c++11 (test for excess errors) +FAIL: g++.old-deja/g++.pt/const2.C -std=c++14 (test for excess errors) +FAIL: g++.old-deja/g++.pt/const2.C -std=c++98 (test for excess errors) We now have Excess errors: Undefined first referenced A::i /var/tmp//ccgwU71c.o compared to output is: Undefined first referenced symbol in file A::i /var/tmp//ccgwU71c.o ld: fatal: symbol referencing errors collect2: error: ld returned 1 exit status before. The failure was caused by [Diagnostic Patch] don't print column zero https://gcc.gnu.org/ml/gcc-patches/2017-10/msg01911.html [...] * lib/gcc-dg.exp (process-message): Use -: for no column. With runtest -v -v -v, I now find process-message: {{} WARNING { [^ ]*i} {}} while before it had been process-message: {{} WARNING {[^ ]*i} {}} Note the additional space after "WARNING {" now. This space is printed unconditionally here set expmsg "$column $msgprefix\[^\n\]*$expmsg" which inserts space after $column even if $column is empty The following patch fixes it by emitting the space only as needed. Bootstrapped without regressions on i386-pc-solaris2.11, sparc-sun-solaris2.11, and x86_64-pc-linux-gnu, installed on mainline. Rainer # HG changeset patch # Parent 6257289977f79d04fd93d77940bc71433e2aa7aa Fix g++.old-deja/g++.pt/const2.C on Solaris diff --git a/gcc/testsuite/lib/gcc-dg.exp b/gcc/testsuite/lib/gcc-dg.exp --- a/gcc/testsuite/lib/gcc-dg.exp +++ b/gcc/testsuite/lib/gcc-dg.exp @@ -1103,14 +1103,15 @@ proc process-message { msgproc msgprefix # Remove it from the original expression and move it # to the proper place in the search expression. set expmsg [string range $expmsg [string length $column] end] + set column "$column " } elseif [string match "" [lindex $newentry 0]] { # The specified line number is 0; don't expect a column number. } else { # There is no column number in the search expression, but we # should expect one in the message itself. - set column {[0-9]+:} + set column {[0-9]+: } } - set expmsg "$column $msgprefix\[^\n\]*$expmsg" + set expmsg "$column$msgprefix\[^\n\]*$expmsg" set newentry [lreplace $newentry 2 2 $expmsg] set dg-messages [lreplace ${dg-messages} end end $newentry]