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: 1846852 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@legolas.ozlabs.org Authentication-Results: legolas.ozlabs.org; dkim=pass (1024-bit key; unprotected) header.d=redhat.com header.i=@redhat.com header.a=rsa-sha256 header.s=mimecast20190719 header.b=OwvcBcl6; dkim-atps=neutral Authentication-Results: legolas.ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=gcc.gnu.org (client-ip=2620:52:3:1:0:246e:9693:128c; helo=server2.sourceware.org; envelope-from=gcc-patches-bounces+incoming=patchwork.ozlabs.org@gcc.gnu.org; receiver=patchwork.ozlabs.org) Received: from server2.sourceware.org (server2.sourceware.org [IPv6:2620:52:3:1:0:246e:9693:128c]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (secp384r1) server-digest SHA384) (No client certificate requested) by legolas.ozlabs.org (Postfix) with ESMTPS id 4S5JTn2DLXz23jg for ; Thu, 12 Oct 2023 03:42:35 +1100 (AEDT) Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 8B9823857C41 for ; Wed, 11 Oct 2023 16:42:32 +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+incoming=patchwork.ozlabs.org@gcc.gnu.org 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 {