[gcc r14-7280] sparc: Char arrays are 64-bit aligned on SPARC
Daniel Hellstrom
danielh@gcc.gnu.org
Tue Jan 16 12:04:02 GMT 2024
https://gcc.gnu.org/g:ee0717da1eb5dc5d17dcd0b35c88c99281385280
commit r14-7280-gee0717da1eb5dc5d17dcd0b35c88c99281385280
Author: Daniel Cederman <cederman@gaisler.com>
Date: Fri Dec 8 09:49:12 2023 +0100
sparc: Char arrays are 64-bit aligned on SPARC
pr88077 fails on SPARC since char HeaderStr[1] in pr88077_1.c and
long HeaderStr in pr88077_0.c differs in alignment.
Warning printed by Binutils ld:
warning: alignment 4 of normal symbol `HeaderStr' in c_lto_pr88077_0.o is
smaller than 8 used by the common definition in c_lto_pr88077_1.o
gcc/testsuite/ChangeLog:
* gcc.dg/lto/pr88077_0.c: Change type to match alignment for SPARC
Diff:
---
gcc/testsuite/gcc.dg/lto/pr88077_0.c | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/gcc/testsuite/gcc.dg/lto/pr88077_0.c b/gcc/testsuite/gcc.dg/lto/pr88077_0.c
index 924fe9fc3f0..9455295051f 100644
--- a/gcc/testsuite/gcc.dg/lto/pr88077_0.c
+++ b/gcc/testsuite/gcc.dg/lto/pr88077_0.c
@@ -1,3 +1,7 @@
/* { dg-lto-do link } */
+#if defined __sparc__
+long long HeaderStr;
+#else
long HeaderStr;
+#endif
More information about the Gcc-cvs
mailing list