From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 2152) id 405983858D33; Fri, 3 Mar 2023 03:33:30 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 405983858D33 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1677814410; bh=PDiSqiOqE0JeKuoT1n+bhuX72RI2R5N5HCPj/Oc5wjM=; h=From:To:Subject:Date:From; b=LB3g01dEQTuJYP9RLC0hYJlaxpIZcm8DI2oG7Wh9ulf6CjwgH9saXS5zxAXC6pbzh IMfRvM1sa01DR85o+I8YFGP+3fhyAECss5RWBGvn6ThwYR6zix9epxVAJgx3a9D/fy uACutAxkl0B457TbagdKUHCL/gI/+hRK87yLsLqw= MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Type: text/plain; charset="utf-8" From: Hans-Peter Nilsson To: gcc-cvs@gcc.gnu.org Subject: [gcc r13-6434] testsuite: Tweak gcc.dg/attr-aligned.c for CRIS X-Act-Checkin: gcc X-Git-Author: Hans-Peter Nilsson X-Git-Refname: refs/heads/master X-Git-Oldrev: 929c6b8cd12a3bd338a4c250274a9d86da5b2ea7 X-Git-Newrev: dc1be3eb33c7f37ac45ad0ccf5be063134a513be Message-Id: <20230303033330.405983858D33@sourceware.org> Date: Fri, 3 Mar 2023 03:33:30 +0000 (GMT) List-Id: https://gcc.gnu.org/g:dc1be3eb33c7f37ac45ad0ccf5be063134a513be commit r13-6434-gdc1be3eb33c7f37ac45ad0ccf5be063134a513be Author: Hans-Peter Nilsson Date: Thu Feb 16 20:21:50 2023 +0100 testsuite: Tweak gcc.dg/attr-aligned.c for CRIS tm.texi says for BIGGEST_ALIGNMENT (from which __BIGGEST_ALIGNMENT__ is derived): "Biggest alignment that any data type can require on this machine, in bits." That is, using that value might be too strict for alignment of *functions* and CRIS requires at least 16-bit alignment for functions. But, one purpose of the test is to test that alignment can be set to a large but valid value, so pick 512, which has some use as a historically required alignment for certain I/O descriptors. * gcc.dg/attr-aligned.c: Adjust comment for ALIGN_MAX_STATIC. (ALIGN_MAX_STATIC): Set to 512 for CRIS. Diff: --- gcc/testsuite/gcc.dg/attr-aligned.c | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/gcc/testsuite/gcc.dg/attr-aligned.c b/gcc/testsuite/gcc.dg/attr-aligned.c index 887bdd0f379..4f0c885dc81 100644 --- a/gcc/testsuite/gcc.dg/attr-aligned.c +++ b/gcc/testsuite/gcc.dg/attr-aligned.c @@ -18,6 +18,10 @@ # else # define ALIGN_MAX_STATIC ALIGN_MAX_HARD # endif +#elif __CRIS__ +/* __BIGGEST_ALIGNMENT__ doesn't cover functions (16 bits for CRIS). */ +# define ALIGN_MAX_STATIC 512 +# define ALIGN_TOO_BIG_OFILE (ALIGN_MAX_HARD << 1) #elif pdp11 # define ALIGN_MAX_STATIC 2 /* Work around a pdp11 ICE (see PR target/87821). */ @@ -29,7 +33,9 @@ /* Is this processor- or operating-system specific? */ # define ALIGN_MAX_STATIC ALIGN_MAX_HARD #else - /* Guaranteed to be accepted regardless of the target. */ + /* Guaranteed to be accepted regardless of the target for objects. + This might not be true for alignment of functions though, so + may need to be set to a target-specific value above. */ # define ALIGN_MAX_STATIC __BIGGEST_ALIGNMENT__ /* Guaranteed to be rejected regardless of the target. */ # define ALIGN_TOO_BIG_OFILE (ALIGN_MAX_HARD << 1)