On Tue, Aug 23, 2016 at 11:57:01AM -0700, Ian Lance Taylor wrote:
> The root cause of https://golang.org/issue/16780 is that GCC on s390
> GNU/Linux does not emit a .file directive. This is because the
> function s390_asm_file_start does not call default_file_start, unlike
> most other TARGET_ASM_FILE_START hooks. This patch should fix the
> problem. Since I don't have an s390 handy, it would be great if
> somebody could test this for me. Thanks.
I've run a regression test "light" with the patch, i.e. only s390x
and Gcc only built with the C language, and it works fine except
that one test case fails that because a "scan-assembler-not" now
matches the ".file" line at the beginning of the file. See
attached patch with that change added.
Additional ChangeLog for the test:
gcc/testsuite/ChangeLog
* gcc.target/s390/nolrl-1.c: Don't match the filename.
Ciao
Dominik ^_^ ^_^
--
Dominik Vogt
IBM Germany
>From 1475ed9918918f4181c5f1e00a905c378ffe9d7a Mon Sep 17 00:00:00 2001
From: Dominik Vogt
Date: Tue, 23 Aug 2016 19:57:35 +0100
Subject: [PATCH] S/390: Add missing call to default_file_start in hook.
---
gcc/config/s390/s390.c | 1 +
gcc/testsuite/gcc.target/s390/nolrl-1.c | 2 +-
2 files changed, 2 insertions(+), 1 deletion(-)
diff --git a/gcc/config/s390/s390.c b/gcc/config/s390/s390.c
index 1abb30b..0a457fc 100644
--- a/gcc/config/s390/s390.c
+++ b/gcc/config/s390/s390.c
@@ -14972,6 +14972,7 @@ s390_vector_alignment (const_tree type)
static void
s390_asm_file_start (void)
{
+ default_file_start ();
s390_asm_output_machine_for_arch (asm_out_file);
}
#endif
diff --git a/gcc/testsuite/gcc.target/s390/nolrl-1.c
b/gcc/testsuite/gcc.target/s390/nolrl-1.c
index e0d1213..c162958 100644
--- a/gcc/testsuite/gcc.target/s390/nolrl-1.c
+++ b/gcc/testsuite/gcc.target/s390/nolrl-1.c
@@ -16,4 +16,4 @@ bar ()
foo (z);
}
-/* { dg-final { scan-assembler-not "lrl" } } */
+/* { dg-final { scan-assembler-not "\tlrl" } } */
--
2.3.0