On 3/26/20 10:23 AM, Jakub Jelinek wrote:
On Mon, Mar 23, 2020 at 04:09:52PM +0100, Martin Liška wrote:
2020-03-17 Martin Liska <mli...@suse.cz>
PR target/93274 PR lto/94271
* gcc.target/i386/pr81213-2.c: New test.
* gcc.target/i386/pr81213.c: Add additional source.
* gcc.dg/lto/pr94271_0.c: New test.
* gcc.dg/lto/pr94271_1.c: New test.
I've noticed this test now has UNRESOLVED cases:
+UNRESOLVED: gcc.target/i386/pr81213.c scan-assembler \\t.globl\\tfoo
+UNRESOLVED: gcc.target/i386/pr81213.c scan-assembler foo.resolver:
+UNRESOLVED: gcc.target/i386/pr81213.c scan-assembler foo\\\\,
@gnu_indirect_function
1) shall the test start with PR ipa/81214 reference when it is PR ipa/81213
test?
Probably yes, note that the test is relevant also to ipa/81214. So I'll add
both PRs
references.
2) the UNRESOLVED cases can be fixed e.g. through:
--- gcc/testsuite/gcc.target/i386/pr81213.c.jj 2020-03-25 11:39:07.605865708
+0100
+++ gcc/testsuite/gcc.target/i386/pr81213.c 2020-03-26 10:13:23.616527400
+0100
@@ -1,6 +1,7 @@
/* PR ipa/81214. */
/* { dg-do run } */
/* { dg-require-ifunc "" } */
+/* { dg-options "-save-temps" } */
/* { dg-additional-sources "pr81213-2.c" } */
int bar();
3) but then one ends up with
FAIL: gcc.target/i386/pr81213.c scan-assembler \t.globl\tfoo
The asm scan does not make sense now as it's a run-time test
and we would see a linker error in case of 2 .globl foo symbols.
I'm suggesting a patch.
Martin
Do you want to change that to scan-assembler-not now that you don't want to
make foo public, or something else?
--- a/gcc/testsuite/gcc.target/i386/pr81213.c
+++ b/gcc/testsuite/gcc.target/i386/pr81213.c
@@ -1,6 +1,9 @@
/* PR ipa/81214. */
-/* { dg-do compile } */
+/* { dg-do run } */
/* { dg-require-ifunc "" } */
+/* { dg-additional-sources "pr81213-2.c" } */
+
+int bar();
__attribute__((target_clones("avx","arch=slm","arch=core-avx2","default")))
static int
@@ -11,7 +14,7 @@ foo ()
int main()
{
- return foo();
+ return foo() + bar();
}
/* { dg-final { scan-assembler "\t.globl\tfoo" } } */
--
2.25.1
Jakub
>From 6a5c17037c0a20bc687a0c08234928959f441971 Mon Sep 17 00:00:00 2001
From: Martin Liska <mli...@suse.cz>
Date: Thu, 26 Mar 2020 10:45:50 +0100
Subject: [PATCH] Fix UNRESOLVED test-case.
gcc/testsuite/ChangeLog:
2020-03-26 Martin Liska <mli...@suse.cz>
* gcc.target/i386/pr81213.c: Do not scan assembler
and add one missing PR entry.
---
gcc/testsuite/gcc.target/i386/pr81213.c | 5 +----
1 file changed, 1 insertion(+), 4 deletions(-)
diff --git a/gcc/testsuite/gcc.target/i386/pr81213.c b/gcc/testsuite/gcc.target/i386/pr81213.c
index 334838631d0..6194e9ecccd 100644
--- a/gcc/testsuite/gcc.target/i386/pr81213.c
+++ b/gcc/testsuite/gcc.target/i386/pr81213.c
@@ -1,3 +1,4 @@
+/* PR ipa/81213. */
/* PR ipa/81214. */
/* { dg-do run } */
/* { dg-require-ifunc "" } */
@@ -16,7 +17,3 @@ int main()
{
return foo() + bar();
}
-
-/* { dg-final { scan-assembler "\t.globl\tfoo" } } */
-/* { dg-final { scan-assembler "foo.resolver:" } } */
-/* { dg-final { scan-assembler "foo\\, @gnu_indirect_function" } } */
--
2.25.1