* [PATCH] ld: Compile 2 CTF tests with -O2
@ 2022-07-22 18:38 H.J. Lu
2022-07-25 16:16 ` Nick Alcock
0 siblings, 1 reply; 3+ messages in thread
From: H.J. Lu @ 2022-07-22 18:38 UTC (permalink / raw)
To: binutils
When GCC 12 is used to build binutils with -O0, the following 2 tests
failed:
FAIL: Conflicted data syms, partially indexed, stripped, with variables
FAIL: Conflicted data syms, partially indexed, stripped
Compile 2 tests with -O2 to avoid test failures.
PR ld/29378
* testsuite/ld-ctf/data-func-conflicted-vars.d: Compile with -O2.
* testsuite/ld-ctf/data-func-conflicted.d: Likewise.
---
ld/testsuite/ld-ctf/data-func-conflicted-vars.d | 1 +
ld/testsuite/ld-ctf/data-func-conflicted.d | 1 +
2 files changed, 2 insertions(+)
diff --git a/ld/testsuite/ld-ctf/data-func-conflicted-vars.d b/ld/testsuite/ld-ctf/data-func-conflicted-vars.d
index b278dfe5d84..4e570c6a61a 100644
--- a/ld/testsuite/ld-ctf/data-func-conflicted-vars.d
+++ b/ld/testsuite/ld-ctf/data-func-conflicted-vars.d
@@ -1,4 +1,5 @@
#as:
+#cc: -O2
#source: data-func-1.c
#source: data-func-2.c
#objdump: --ctf
diff --git a/ld/testsuite/ld-ctf/data-func-conflicted.d b/ld/testsuite/ld-ctf/data-func-conflicted.d
index 7a1b2d72234..b0db511a987 100644
--- a/ld/testsuite/ld-ctf/data-func-conflicted.d
+++ b/ld/testsuite/ld-ctf/data-func-conflicted.d
@@ -1,4 +1,5 @@
#as:
+#cc: -O2
#source: data-func-1.c
#source: data-func-2.c
#objdump: --ctf
--
2.37.1
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] ld: Compile 2 CTF tests with -O2
2022-07-22 18:38 [PATCH] ld: Compile 2 CTF tests with -O2 H.J. Lu
@ 2022-07-25 16:16 ` Nick Alcock
2022-07-25 16:59 ` H.J. Lu
0 siblings, 1 reply; 3+ messages in thread
From: Nick Alcock @ 2022-07-25 16:16 UTC (permalink / raw)
To: binutils
On 22 Jul 2022, H. J. Lu via Binutils stated:
> When GCC 12 is used to build binutils with -O0, the following 2 tests
> failed:
>
> FAIL: Conflicted data syms, partially indexed, stripped, with variables
> FAIL: Conflicted data syms, partially indexed, stripped
>
> Compile 2 tests with -O2 to avoid test failures.
Ack, that works fine. I honestly didn't think that anyone would have
tried a -O0 compilation. I'm a bit surprised it depends on optimization
levels, though -- maybe the result has *too many* types and the
comparisons fail as a result?
Still, -O2 is a valid fix and doesn't stop the test checking what it's
supposed to, so go for it.
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] ld: Compile 2 CTF tests with -O2
2022-07-25 16:16 ` Nick Alcock
@ 2022-07-25 16:59 ` H.J. Lu
0 siblings, 0 replies; 3+ messages in thread
From: H.J. Lu @ 2022-07-25 16:59 UTC (permalink / raw)
To: Nick Alcock; +Cc: Binutils
On Mon, Jul 25, 2022 at 9:16 AM Nick Alcock <nick.alcock@oracle.com> wrote:
>
> On 22 Jul 2022, H. J. Lu via Binutils stated:
>
> > When GCC 12 is used to build binutils with -O0, the following 2 tests
> > failed:
> >
> > FAIL: Conflicted data syms, partially indexed, stripped, with variables
> > FAIL: Conflicted data syms, partially indexed, stripped
> >
> > Compile 2 tests with -O2 to avoid test failures.
>
> Ack, that works fine. I honestly didn't think that anyone would have
> tried a -O0 compilation. I'm a bit surprised it depends on optimization
I use it for debugging.
> levels, though -- maybe the result has *too many* types and the
> comparisons fail as a result?
>
> Still, -O2 is a valid fix and doesn't stop the test checking what it's
> supposed to, so go for it.
I am checking it in.
Thanks.
--
H.J.
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2022-07-25 16:59 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-07-22 18:38 [PATCH] ld: Compile 2 CTF tests with -O2 H.J. Lu
2022-07-25 16:16 ` Nick Alcock
2022-07-25 16:59 ` H.J. Lu
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).