From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from foss.arm.com (foss.arm.com [217.140.110.172]) by sourceware.org (Postfix) with ESMTP id 19319388E80D for ; Mon, 5 Dec 2022 07:33:37 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org 19319388E80D Authentication-Results: sourceware.org; dmarc=pass (p=none dis=none) header.from=arm.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=arm.com Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.121.207.14]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id 5F87023A; Sun, 4 Dec 2022 23:33:43 -0800 (PST) Received: from localhost (e121540-lin.manchester.arm.com [10.32.98.62]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id F39743F73D; Sun, 4 Dec 2022 23:33:35 -0800 (PST) From: Richard Sandiford To: Alexandre Oliva via Gcc-patches Mail-Followup-To: Alexandre Oliva via Gcc-patches ,Alexandre Oliva , Rainer Orth , Mike Stump , richard.sandiford@arm.com Cc: Alexandre Oliva , Rainer Orth , Mike Stump Subject: Re: [PATCH] [testsuite] [arm/aarch64] -fno-short-enums for auto-init-[12].c References: Date: Mon, 05 Dec 2022 07:33:34 +0000 In-Reply-To: (Alexandre Oliva via Gcc-patches's message of "Fri, 02 Dec 2022 06:25:30 -0300") Message-ID: User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/26.3 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Status: No, score=-39.3 required=5.0 tests=BAYES_00,GIT_PATCH_0,KAM_DMARC_NONE,KAM_DMARC_STATUS,KAM_LAZY_DOMAIN_SECURITY,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 List-Id: Alexandre Oliva via Gcc-patches writes: > On arm-eabi, and possibly on other platforms, -fshort-enums is enabled > by default, which breaks some tests' expectations as to enum sizes > with DEFERRED_INIT. Disable short enums so that the expectations are > met. > > Regstraped on x86_64-linux-gnu, also tested with crosses to riscv64-elf > and arm-eabi. Ok to install? OK, thanks. Richard > for gcc/testsuite/ChangeLog > > * c-c++-common/auto-init-1.c: Add -fno-short-enums. > * c-c++-common/auto-init-2.c: Likewise. > * gcc.dg/debug/btf/btf-enum-1.c: Likewise. > --- > gcc/testsuite/c-c++-common/auto-init-1.c | 2 +- > gcc/testsuite/c-c++-common/auto-init-2.c | 2 +- > gcc/testsuite/gcc.dg/debug/btf/btf-enum-1.c | 2 +- > 3 files changed, 3 insertions(+), 3 deletions(-) > > diff --git a/gcc/testsuite/c-c++-common/auto-init-1.c b/gcc/testsuite/c-c++-common/auto-init-1.c > index df04358728bab..3e6a4984eea22 100644 > --- a/gcc/testsuite/c-c++-common/auto-init-1.c > +++ b/gcc/testsuite/c-c++-common/auto-init-1.c > @@ -1,6 +1,6 @@ > /* Verify zero initialization for integer and pointer type automatic variables. */ > /* { dg-do compile { target { ilp32 || lp64 } } } */ > -/* { dg-options "-ftrivial-auto-var-init=zero -fdump-tree-gimple" } */ > +/* { dg-options "-ftrivial-auto-var-init=zero -fno-short-enums -fdump-tree-gimple" } */ > > #ifndef __cplusplus > # define bool _Bool > diff --git a/gcc/testsuite/c-c++-common/auto-init-2.c b/gcc/testsuite/c-c++-common/auto-init-2.c > index 6ac63bb1ddac1..d356e508b836f 100644 > --- a/gcc/testsuite/c-c++-common/auto-init-2.c > +++ b/gcc/testsuite/c-c++-common/auto-init-2.c > @@ -1,6 +1,6 @@ > /* Verify pattern initialization for integer and pointer type automatic variables. */ > /* { dg-do compile { target { ilp32 || lp64 } } } */ > -/* { dg-options "-ftrivial-auto-var-init=pattern -fdump-tree-gimple" } */ > +/* { dg-options "-ftrivial-auto-var-init=pattern -fno-short-enums -fdump-tree-gimple" } */ > > #ifndef __cplusplus > # define bool _Bool > diff --git a/gcc/testsuite/gcc.dg/debug/btf/btf-enum-1.c b/gcc/testsuite/gcc.dg/debug/btf/btf-enum-1.c > index 7e940529f1b6d..2887cb1c5f244 100644 > --- a/gcc/testsuite/gcc.dg/debug/btf/btf-enum-1.c > +++ b/gcc/testsuite/gcc.dg/debug/btf/btf-enum-1.c > @@ -1,7 +1,7 @@ > /* Test BTF generation for enums. */ > > /* { dg-do compile } */ > -/* { dg-options "-O0 -gbtf -dA" } */ > +/* { dg-options "-O0 -gbtf -fno-short-enums -dA" } */ > > /* { dg-final { scan-assembler-times "\[\t \]0x6000004\[\t \]+\[^\n\]*btt_info" 1 } } */ > /* { dg-final { scan-assembler-times "\[\t \]0x86000003\[\t \]+\[^\n\]*btt_info" 1 } } */