From patchwork Fri Sep 23 17:01:50 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: David Malcolm X-Patchwork-Id: 674156 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org 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 3sgfmN2pfxz9t14 for ; Sat, 24 Sep 2016 03:02:11 +1000 (AEST) Authentication-Results: ozlabs.org; dkim=pass (1024-bit key; unprotected) header.d=gcc.gnu.org header.i=@gcc.gnu.org header.b=W9ZYrug7; dkim-atps=neutral DomainKey-Signature: a=rsa-sha1; c=nofws; d=gcc.gnu.org; h=list-id :list-unsubscribe:list-archive:list-post:list-help:sender :message-id:subject:from:to:date:content-type:mime-version; q= dns; s=default; b=PbaDOrM6BcDRroew7oFX5h69JGFyM7s1ucZOadFdugpsAN CscR4r4F+vwV4bUEqTrM4QhF7PcDLqnjTUdEysI0CxahrZddQ1jIvRIua/tjTvzO RdqyDmwaX98IhU+9exdeK4jm5Us5pzdIChNXETJjHi6gOQXvH5qzd13OQDjbY= 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 :message-id:subject:from:to:date:content-type:mime-version; s= default; bh=9kzlyKcTJOK5tF9XM+y0gh9zDXM=; b=W9ZYrug71CPgn7LsxcLw 9NFHms0Ry7jMpiDCv8OF+bJGbPB8G53kaTw5DZqLjbDzioEX0jWUiMABdXPku8jc yPeARxRVe7pYJ/ImP5jrkBYR0bNvmAgTG7rxjxRQOMlAVprcDJjdBUrUwNOEaWyd CSj0lNWPLkqFzjSj+TR6nwk= Received: (qmail 116884 invoked by alias); 23 Sep 2016 17:02:04 -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 116875 invoked by uid 89); 23 Sep 2016 17:02:03 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-4.2 required=5.0 tests=BAYES_00, KAM_ASCII_DIVIDERS, RP_MATCHES_RCVD, SPF_HELO_PASS autolearn=ham version=3.3.2 spammy=U*dmalcolm, sk:dmalcol, dmalcolm@redhat.com, dmalcolmredhatcom X-HELO: mx1.redhat.com Received: from mx1.redhat.com (HELO mx1.redhat.com) (209.132.183.28) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Fri, 23 Sep 2016 17:01:53 +0000 Received: from int-mx14.intmail.prod.int.phx2.redhat.com (int-mx14.intmail.prod.int.phx2.redhat.com [10.5.11.27]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 73FD4C0006E7 for ; Fri, 23 Sep 2016 17:01:51 +0000 (UTC) Received: from vpn-231-177.phx2.redhat.com (vpn-231-177.phx2.redhat.com [10.3.231.177]) by int-mx14.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id u8NH1oUI025792 for ; Fri, 23 Sep 2016 13:01:51 -0400 Message-ID: <1474650110.23088.58.camel@redhat.com> Subject: [committed] Fix gcc.dg/tree-ssa/builtin-sprintf-warn-4.c From: David Malcolm To: "gcc-patches@gcc.gnu.org" Date: Fri, 23 Sep 2016 13:01:50 -0400 Mime-Version: 1.0 X-IsSubscribed: yes My fix to the locations for NUL-terminators in substring_loc changed the output for gcc.dg/tree-ssa/builtin-sprintf-warn-4.c, leading to a couple of FAILs from that test. Sorry; my testing of the earlier patch was incomplete (I needed to rebase). I've committed the attached patch to trunk (r240442), which fixes the test failures. Index: gcc/testsuite/gcc.dg/tree-ssa/builtin-sprintf-warn-4.c =================================================================== --- gcc/testsuite/gcc.dg/tree-ssa/builtin-sprintf-warn-4.c (revision 240441) +++ gcc/testsuite/gcc.dg/tree-ssa/builtin-sprintf-warn-4.c (revision 240442) @@ -12,7 +12,7 @@ { dg-message "format output 2 bytes into a destination of size 1" "" { target *-*-*-* } 10 } { dg-begin-multiline-output "" } sprintf (dst + 7, "%-s", "1"); - ^~~~~ + ~~^~ { dg-end-multiline-output "" } { dg-begin-multiline-output "" } sprintf (dst + 7, "%-s", "1"); Index: gcc/testsuite/ChangeLog =================================================================== --- gcc/testsuite/ChangeLog (revision 240441) +++ gcc/testsuite/ChangeLog (revision 240442) @@ -1,3 +1,10 @@ +2016-09-23 David Malcolm + + PR preprocessor/77672 + * gcc.dg/tree-ssa/builtin-sprintf-warn-4.c (test): Update + expected multiline output from first warning to reflect change + in r240434. + 2016-09-23 Thomas Preud'homme * gcc.dg/tree-ssa/builtin-sprintf-warn-2.c: Fix xfail pattern.