ld: Compile 2 CTF tests with -O2
authorH.J. Lu <hjl.tools@gmail.com>
Fri, 22 Jul 2022 18:35:00 +0000 (11:35 -0700)
committerH.J. Lu <hjl.tools@gmail.com>
Mon, 25 Jul 2022 16:59:47 +0000 (09:59 -0700)
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
ld/testsuite/ld-ctf/data-func-conflicted.d

index b278dfe5d84155ba1577f9e9064f60647702e693..4e570c6a61a37a079dcdd106be24e0016b2062b1 100644 (file)
@@ -1,4 +1,5 @@
 #as:
+#cc: -O2
 #source: data-func-1.c
 #source: data-func-2.c
 #objdump: --ctf
index 7a1b2d722345d3788fdae67f1383f446589dcd57..b0db511a987c34b1c293308df67fb19cf42a6fca 100644 (file)
@@ -1,4 +1,5 @@
 #as:
+#cc: -O2
 #source: data-func-1.c
 #source: data-func-2.c
 #objdump: --ctf