public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
* [PATCH] sparc: Char arrays are 64-bit aligned on SPARC
@ 2024-01-05  7:19 Daniel Cederman
  2024-01-05  7:19 ` [PATCH 1/2] sparc: Revert membar optimization that is not suitable for LEON5 Daniel Cederman
                   ` (3 more replies)
  0 siblings, 4 replies; 10+ messages in thread
From: Daniel Cederman @ 2024-01-05  7:19 UTC (permalink / raw)
  To: gcc-patches; +Cc: ebotcazou, daniel

pr88077 fails on SPARC since char HeaderStr[1] in pr88077_1.c and
long HeaderStr in pr88077_0.c differs in alignment.

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
---
 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 924fe9fc3f01..9455295051fc 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
-- 
2.40.1


^ permalink raw reply	[flat|nested] 10+ messages in thread

end of thread, other threads:[~2024-01-09  8:45 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2024-01-05  7:19 [PATCH] sparc: Char arrays are 64-bit aligned on SPARC Daniel Cederman
2024-01-05  7:19 ` [PATCH 1/2] sparc: Revert membar optimization that is not suitable for LEON5 Daniel Cederman
2024-01-08  9:22   ` Eric Botcazou
2024-01-05  7:19 ` [PATCH] sparc: Treat instructions with length 0 as empty Daniel Cederman
2024-01-08  9:26   ` Eric Botcazou
2024-01-05  7:19 ` [PATCH 2/2] sparc: Add errata workaround to membar patterns Daniel Cederman
2024-01-08  9:32   ` Eric Botcazou
2024-01-08  9:20 ` [PATCH] sparc: Char arrays are 64-bit aligned on SPARC Eric Botcazou
2024-01-08 11:42   ` Daniel Cederman
2024-01-09  8:45     ` Eric Botcazou

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).