aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHans-Peter Nilsson <hp@axis.com>2023-02-16 20:21:50 +0100
committerHans-Peter Nilsson <hp@bitrange.com>2023-03-03 04:32:12 +0100
commitdc1be3eb33c7f37ac45ad0ccf5be063134a513be (patch)
tree76ba79cffbea37126770e4fe557957c7ffff9ddc
parent929c6b8cd12a3bd338a4c250274a9d86da5b2ea7 (diff)
downloadgcc-dc1be3eb33c7f37ac45ad0ccf5be063134a513be.zip
gcc-dc1be3eb33c7f37ac45ad0ccf5be063134a513be.tar.gz
gcc-dc1be3eb33c7f37ac45ad0ccf5be063134a513be.tar.bz2
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.
-rw-r--r--gcc/testsuite/gcc.dg/attr-aligned.c8
1 files changed, 7 insertions, 1 deletions
diff --git a/gcc/testsuite/gcc.dg/attr-aligned.c b/gcc/testsuite/gcc.dg/attr-aligned.c
index 887bdd0..4f0c885 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)