From patchwork Wed Oct 11 16:42:16 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Florian Weimer X-Patchwork-Id: 151466 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a05:612c:2908:b0:403:3b70:6f57 with SMTP id ib8csp671474vqb; Wed, 11 Oct 2023 09:42:50 -0700 (PDT) X-Google-Smtp-Source: AGHT+IGYpKfT9fVvMQGOZCpGPrJ+IcdMLTMFjbpx2j0f7rjOoLnFd65AGEKyYpUBjmv7wLxFqkdk X-Received: by 2002:a17:907:9409:b0:9ae:577b:3832 with SMTP id dk9-20020a170907940900b009ae577b3832mr16565471ejc.24.1697042570112; Wed, 11 Oct 2023 09:42:50 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1697042570; cv=none; d=google.com; s=arc-20160816; b=0MzGbNIQUaf88reMqUpvl1TAqOCHTzzKdcZBfl3BuEUwcCtz0/lohF9kTHMzhWor5F Zswr5leK2d95lestqDnYAmLy5uQuCZzxRANi+YUGT91p3v2Zj0irYICw9LpjpFZcmHxz 3tFALHkj8J1sCvSppw6q28RqpoPh2AzViWO/5VrCSqXRaAno1qSHMk0a7+ZWns3lkQoy rnwYdU1GE+cvr7ODLTGzHRoVVPqGFi94cFFIKStMn42OZcf8ez44ULQOjqxWT2hRn99v E2EH2D2jLUgK6lX/lDAew0bQNIrFCzhEcY8KDL+OJNr20XJXDa5JisqTLbvsnJxFisg/ jt1g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=errors-to:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:mime-version:user-agent :message-id:date:subject:to:from:dkim-signature:dmarc-filter :delivered-to; bh=pykxwAICKJuwchS9P0458AqHLhZRX4u1XpxgGb+EueU=; fh=hPrbWPhweUx4V0GV9uXJqbyAzg2ABmTz7kczrAQqMmM=; b=w0Mc4giZFkKyssRqayBcyTw/2CHWcJlbZNfALEAXCqlO6Iu2cvq+lIM32EbN2I00VW 0GEubLtyBliNGPzQrove18nph/+RrhjAXNStK6jivGp5BEGBNg3UsKq4+2Nd6MrfOy+f 5pRnP6qugWRfBlga+3YECnP13iOrkngAT4xl9OOkVg+0rIShshaHsiJ8oGrzhwX0rli5 noO3I8JgRdPeToDwtBFG97v51QNBgkUn3yeFq7w1NHIVpyCux7lZACca2XR18Vk3k2If bb9SGIsdeDzW+XeqsjWIp/vsN472FBUArdmGbbh3U44v0/GYsw0eHMFHPHFv3svl6h2n 2r4A== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=OwvcBcl6; spf=pass (google.com: domain of gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org designates 2620:52:3:1:0:246e:9693:128c as permitted sender) smtp.mailfrom="gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Received: from server2.sourceware.org (server2.sourceware.org. [2620:52:3:1:0:246e:9693:128c]) by mx.google.com with ESMTPS id y24-20020aa7c258000000b005360daac8d9si6414129edo.449.2023.10.11.09.42.49 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 11 Oct 2023 09:42:50 -0700 (PDT) Received-SPF: pass (google.com: domain of gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org designates 2620:52:3:1:0:246e:9693:128c as permitted sender) client-ip=2620:52:3:1:0:246e:9693:128c; Authentication-Results: mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=OwvcBcl6; spf=pass (google.com: domain of gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org designates 2620:52:3:1:0:246e:9693:128c as permitted sender) smtp.mailfrom="gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 93A7E3858D1E for ; Wed, 11 Oct 2023 16:42:44 +0000 (GMT) X-Original-To: gcc-patches@gcc.gnu.org Delivered-To: gcc-patches@gcc.gnu.org Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.133.124]) by sourceware.org (Postfix) with ESMTPS id 374363858D1E for ; Wed, 11 Oct 2023 16:42:21 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 374363858D1E Authentication-Results: sourceware.org; dmarc=pass (p=none dis=none) header.from=redhat.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=redhat.com DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1697042540; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type; bh=pykxwAICKJuwchS9P0458AqHLhZRX4u1XpxgGb+EueU=; b=OwvcBcl640RlqZE0r6t7e3OTyTGmQTHSgCMi6XAaQTuIS+Ayyo3kzvaZoG2WBBGVfKcOMv p7YxaPcTjiNVZYWcTH3Nnm8FKNFdCgBUHZCqORKqvYxtixwtfMJbBouQ5SePguAKd+2iXV kIAO536W2jSEJK/HeJEIE8IxMT/xRrk= Received: from mimecast-mx02.redhat.com (mimecast-mx02.redhat.com [66.187.233.88]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-298-N074IYX5NdivswnQkCaajg-1; Wed, 11 Oct 2023 12:42:19 -0400 X-MC-Unique: N074IYX5NdivswnQkCaajg-1 Received: from smtp.corp.redhat.com (int-mx06.intmail.prod.int.rdu2.redhat.com [10.11.54.6]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id 38317811E7D for ; Wed, 11 Oct 2023 16:42:19 +0000 (UTC) Received: from oldenburg.str.redhat.com (unknown [10.2.16.9]) by smtp.corp.redhat.com (Postfix) with ESMTPS id A0BDC21CAC6B for ; Wed, 11 Oct 2023 16:42:18 +0000 (UTC) From: Florian Weimer To: gcc-patches@gcc.gnu.org Subject: [PATCH] C99 test suite readiness: Mark some C89 tests Date: Wed, 11 Oct 2023 18:42:16 +0200 Message-ID: <87a5spun4n.fsf@oldenburg.str.redhat.com> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.3 (gnu/linux) MIME-Version: 1.0 X-Scanned-By: MIMEDefang 3.1 on 10.11.54.6 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com X-Spam-Status: No, score=-10.6 required=5.0 tests=BAYES_00, DKIMWL_WL_HIGH, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, GIT_PATCH_0, RCVD_IN_DNSWL_NONE, RCVD_IN_MSPIKE_H3, RCVD_IN_MSPIKE_WL, SPF_HELO_NONE, SPF_NONE, TXREP autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server2.sourceware.org X-BeenThere: gcc-patches@gcc.gnu.org X-Mailman-Version: 2.1.30 Precedence: list List-Id: Gcc-patches mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1779478110057757844 X-GMAIL-MSGID: 1779478110057757844 Add -std=gnu89 to some tests which evidently target C89-only language features. gcc/testsuite/ * gcc.c-torture/compile/920501-11.c: Compile with -std=gnu89. * gcc.c-torture/compile/920501-23.c: Likewise. * gcc.c-torture/compile/920501-8.c: Likewise. * gcc.c-torture/compile/920701-1.c: Likewise. * gcc.c-torture/compile/930529-1.c: Likewise. --- gcc/testsuite/gcc.c-torture/compile/920501-11.c | 1 + gcc/testsuite/gcc.c-torture/compile/920501-23.c | 1 + gcc/testsuite/gcc.c-torture/compile/920501-8.c | 1 + gcc/testsuite/gcc.c-torture/compile/920701-1.c | 1 + gcc/testsuite/gcc.c-torture/compile/930529-1.c | 1 + 5 files changed, 5 insertions(+) base-commit: aaa5a5318adbefe87c1b781b8a3e5fc332e661ec diff --git a/gcc/testsuite/gcc.c-torture/compile/920501-11.c b/gcc/testsuite/gcc.c-torture/compile/920501-11.c index d636357e867..fccd0c4e1aa 100644 --- a/gcc/testsuite/gcc.c-torture/compile/920501-11.c +++ b/gcc/testsuite/gcc.c-torture/compile/920501-11.c @@ -1 +1,2 @@ +/* { dg-additional-options "-std=gnu89" } */ typedef struct{int s;}S;foo(){int i=(int)&(S){(void*)((int)&(S){1})};} diff --git a/gcc/testsuite/gcc.c-torture/compile/920501-23.c b/gcc/testsuite/gcc.c-torture/compile/920501-23.c index 291d93e6c5d..2bc8b32e1a0 100644 --- a/gcc/testsuite/gcc.c-torture/compile/920501-23.c +++ b/gcc/testsuite/gcc.c-torture/compile/920501-23.c @@ -1,3 +1,4 @@ +/* { dg-additional-options "-std=gnu89" } */ typedef unsigned char qi; typedef unsigned short hi; typedef unsigned long si; diff --git a/gcc/testsuite/gcc.c-torture/compile/920501-8.c b/gcc/testsuite/gcc.c-torture/compile/920501-8.c index 68e33934d21..bba64d44e91 100644 --- a/gcc/testsuite/gcc.c-torture/compile/920501-8.c +++ b/gcc/testsuite/gcc.c-torture/compile/920501-8.c @@ -1 +1,2 @@ +/* { dg-additional-options "-std=gnu89" } */ x(int*p){int x=p;} diff --git a/gcc/testsuite/gcc.c-torture/compile/920701-1.c b/gcc/testsuite/gcc.c-torture/compile/920701-1.c index 4302f9ea331..2a9c8314052 100644 --- a/gcc/testsuite/gcc.c-torture/compile/920701-1.c +++ b/gcc/testsuite/gcc.c-torture/compile/920701-1.c @@ -1 +1,2 @@ +/* { dg-additional-options "-std=gnu89" } */ f(char*c){extern char a[],b[];return a+(b-c);} diff --git a/gcc/testsuite/gcc.c-torture/compile/930529-1.c b/gcc/testsuite/gcc.c-torture/compile/930529-1.c index 8ad358dff5a..4e0bcd8cc04 100644 --- a/gcc/testsuite/gcc.c-torture/compile/930529-1.c +++ b/gcc/testsuite/gcc.c-torture/compile/930529-1.c @@ -1,4 +1,5 @@ /* { dg-require-effective-target untyped_assembly } */ +/* { dg-additional-options "-std=gnu89" } */ struct r {