This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [gofrontend-dev] Re: [PATCH 7/9] Gccgo port to s390[x] -- part I


On Wed, Oct 29, 2014 at 10:16:40AM -0700, Ian Taylor wrote:
> Thanks.  Part of the problem is that the m68k max alignment is 16
> bits, but the godump test expects it to be at least 64 bits.  This is
> BIGGEST_ALIGNMENT in config/m68k/m68k.h.  Another part of the problem
> seems to be that structs are sometimes aligned to 16 bits although
> there is no obvious reason for that.  I'm not sure where that is
> coming from.

Hm, the test cases make assumptions about the Abi (structure
padding and alignment) that are true on x86, x64_64 and s390[x].
That may not be the case on other platforms and hence the tests
fail.  Another candidate for test failures is the effect of
bitfields (named or anonymous) on structure layout.

> We could disable the test on m68k or make it more accepting.

Since the point of some of the tests is to make sure that the Go
structure layout matches the C layout, making the tests accept
deviations seems to be rather pointless.  It's possible to add
target selectors to all the "scan-file" lines, but that is a lot
of work and will likely become unmaintainable very soon when more
platforms need to be added.  Personally I cannot provide fixed
tests for all the Abis either, so my suggestion is to "xfail" the
test on all targets except s390[x] and x86_64 and leave it to the
people who know the other platforms to decide whether the test
should work there or how the test could be modified to work.

See attached patch.

Ciao

Dominik ^_^  ^_^

-- 

Dominik Vogt
IBM Germany
>From fc92faa8532e3ea0ac3b4c8b18eb6b0a3ee862dc Mon Sep 17 00:00:00 2001
From: Dominik Vogt <vogt@linux.vnet.ibm.com>
Date: Thu, 30 Oct 2014 07:50:18 +0100
Subject: [PATCH] Xfail -fdump-go-spec tests for all platforms except s390[x]
 and x86_64.

---
 gcc/testsuite/gcc.misc-tests/godump-1.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/gcc/testsuite/gcc.misc-tests/godump-1.c b/gcc/testsuite/gcc.misc-tests/godump-1.c
index f339cc9..91b8637 100644
--- a/gcc/testsuite/gcc.misc-tests/godump-1.c
+++ b/gcc/testsuite/gcc.misc-tests/godump-1.c
@@ -2,6 +2,7 @@
 
 /* { dg-options "-c -fdump-go-spec=godump-1.out" } */
 /* { dg-do compile } */
+/* { dg-xfail-if "not supported for target" { ! "s390*-*-* x86_64-*-*" } } */
 
 #include <stdint.h>
 
-- 
1.8.4.2


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]