From patchwork Thu Jun 2 15:04:11 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jakub Jelinek X-Patchwork-Id: 629298 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 3rL9Vq0lCwz9t8J for ; Fri, 3 Jun 2016 01:04:34 +1000 (AEST) Authentication-Results: ozlabs.org; dkim=pass (1024-bit key; unprotected) header.d=gcc.gnu.org header.i=@gcc.gnu.org header.b=EU6yGqGp; 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:date :from:to:cc:subject:message-id:reply-to:references:mime-version :content-type:in-reply-to; q=dns; s=default; b=X0/whCCAG2po5NkMU w9x2/B3yilnTE2BW+vWY/AMVvGKFUlz19qXYH2C2DLfl/CZAFct8m+NLpZTV8iLO w8Uh3bxBPjXMBwhInBkFPg8u8wJH+VcWHc3Ccuu7mELi1bgehMT4b500Swt9NahE L2Xpd6iaODCvYgUvAIOd/bVFzI= 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:date :from:to:cc:subject:message-id:reply-to:references:mime-version :content-type:in-reply-to; s=default; bh=bmP7o6CtyjhP5N/6tQZQczV XYmY=; b=EU6yGqGp1lyFBv/ROZTUE9V4LIhMYjxtfFZAPcppiTTZILrPmd0jWGw 4uzshonSaVHv7kslvZchkpnCyEalqxEpn2mmXHHapDmrqvoUYryUTWYaxPHqcaLH Un6BSe4lCbC1jqwhN5J863qIOdzdVfui8LFyr6scpWdrmYi++z7g= Received: (qmail 49232 invoked by alias); 2 Jun 2016 15:04:23 -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 49206 invoked by uid 89); 2 Jun 2016 15:04:21 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-3.3 required=5.0 tests=BAYES_00, RP_MATCHES_RCVD, SPF_HELO_PASS autolearn=ham version=3.3.2 spammy=Hx-languages-length:1367, 59PM, 59pm 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 (AES256-GCM-SHA384 encrypted) ESMTPS; Thu, 02 Jun 2016 15:04:20 +0000 Received: from int-mx11.intmail.prod.int.phx2.redhat.com (int-mx11.intmail.prod.int.phx2.redhat.com [10.5.11.24]) (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 512BD7DCF1; Thu, 2 Jun 2016 15:04:19 +0000 (UTC) Received: from tucnak.zalov.cz (ovpn-116-51.ams2.redhat.com [10.36.116.51]) by int-mx11.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id u52F4HKS012030 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=NO); Thu, 2 Jun 2016 11:04:18 -0400 Received: from tucnak.zalov.cz (localhost [127.0.0.1]) by tucnak.zalov.cz (8.15.2/8.15.2) with ESMTP id u52F4FO6002446; Thu, 2 Jun 2016 17:04:15 +0200 Received: (from jakub@localhost) by tucnak.zalov.cz (8.15.2/8.15.2/Submit) id u52F4CRl002445; Thu, 2 Jun 2016 17:04:12 +0200 Date: Thu, 2 Jun 2016 17:04:11 +0200 From: Jakub Jelinek To: Christophe Lyon Cc: Matthias Klose , Bernd Schmidt , Dhole , Eduard Sanou , "gcc-patches@gcc.gnu.org" Subject: Re: Allow embedded timestamps by C/C++ macros to be set externally (3) Message-ID: <20160602150411.GK28550@tucnak.redhat.com> Reply-To: Jakub Jelinek References: <20160429071744.GX26501@tucnak.zalov.cz> <20160505232654.GW21574@panther> <5731C6B3.3070903@redhat.com> <20160512003651.GB17273@panther> <57344A09.7030901@redhat.com> <20160513170930.GN17273@panther> <574F0D5F.7000501@redhat.com> <574F1483.6030806@ubuntu.com> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.24 (2015-08-30) X-IsSubscribed: yes On Thu, Jun 02, 2016 at 04:49:59PM +0200, Christophe Lyon wrote: > I'm also seeing that the new gcc.dg/cpp/source_date_epoch-1.c fails because > the output pattern finishes with '\n' instead of the usual '(\n|\r\n|\r)' > > Can I add this as obvious? Some remote test invocations even eat the final newline from what I vaguely remember from various complains about the asan and ubsan testsuite. So we could just drop that ^ and \n$ from dg-output, but then, what is the point of using dg-output at all here? Isn't following just better? Tested on x86_64-linux, ok for trunk? 2016-06-02 Jakub Jelinek * gcc.dg/cpp/source_date_epoch-1.c (main): Test __DATE__ and __TIME__ strings with __builtin_strcmp instead of printf and dg-output. Jakub --- gcc/testsuite/gcc.dg/cpp/source_date_epoch-1.c.jj 2016-06-01 21:26:27.000000000 +0200 +++ gcc/testsuite/gcc.dg/cpp/source_date_epoch-1.c 2016-06-02 17:02:06.164281564 +0200 @@ -2,10 +2,10 @@ /* { dg-set-compiler-env-var SOURCE_DATE_EPOCH "630333296" } */ int -main(void) +main () { - __builtin_printf ("%s %s\n", __DATE__, __TIME__); + if (__builtin_strcmp (__DATE__, "Dec 22 1989") != 0 + || __builtin_strcmp (__TIME__, "12:34:56") != 0) + __builtin_abort (); return 0; } - -/* { dg-output "^Dec 22 1989 12:34:56\n$" } */