Hi!
On 2020-04-28T11:12:56+0200, Manfred Schwarb <[email protected]> wrote:
> I guess this goes under the obvious and trivial rules.
>
> There are several malformed dejagnu directives in the gcc.dg testsuite.
Generally, ACK, and thanks for the cleanup.
> Below I fixed some of them following these criteria:
> - fix mis-typed directives
> - require that the outermost braces are space padded
> - fix imbalanced braces
>
> Several of these changes are no-ops, as nonsensical directives act as "dg-do
> compile",
> but they should be fixed nevertheless, IMO.
> --- a/gcc/testsuite/gcc.dg/lto/pr52634_0.c
> +++ b/gcc/testsuite/gcc.dg/lto/pr52634_0.c
> @@ -1,7 +1,7 @@
> /* { dg-require-weak "" } */
> /* { dg-require-alias "" } */
> /* { dg-lto-do link } */
> -/* { dg-lto-options {{-flto -r -flto-partition=1to1}} */
> +/* { dg-lto-options {-flto -r -flto-partition=1to1} } */
> /* { dg-extra-ld-options "-flinker-output=nolto-rel" } */
> extern int cfliteValueCallBacks;
> void baz (int *);
That one's not correct: 'dg-lto-options' is "special". I've pushed
commit b70eeb248efe2b3e9bdb5e26b490e3d8aa07022d "Further adjust
'dg-lto-options' in 'gcc.dg/lto/pr52634'", see attached. (I'll claim you
ran into that because you said "obvious and trivial".) ;-P
Grüße
Thomas
-----------------
Mentor Graphics (Deutschland) GmbH, Arnulfstraße 201, 80634 München / Germany
Registergericht München HRB 106955, Geschäftsführer: Thomas Heurung, Alexander
Walter
>From b70eeb248efe2b3e9bdb5e26b490e3d8aa07022d Mon Sep 17 00:00:00 2001
From: Thomas Schwinge <[email protected]>
Date: Sat, 6 Jun 2020 13:50:24 +0200
Subject: [PATCH] Further adjust 'dg-lto-options' in 'gcc.dg/lto/pr52634'
The recent commit f8a4141bae53f9125d374e5873dcda3f75392f1f "Fix various dg
directives" corrected the imbalanced curly braces in 'dg-lto-options', which
changes the testing as follows:
-PASS: gcc.dg/lto/pr52634 c_lto_pr52634_0.o assemble, -O0 -flto -flto-partition=none -fuse-linker-plugin
-PASS: gcc.dg/lto/pr52634 c_lto_pr52634_1.o assemble, -O0 -flto -flto-partition=none -fuse-linker-plugin
-PASS: gcc.dg/lto/pr52634 c_lto_pr52634_0.o-c_lto_pr52634_1.o link, -O0 -flto -flto-partition=none -fuse-linker-plugin
-PASS: gcc.dg/lto/pr52634 c_lto_pr52634_0.o assemble, -O2 -flto -flto-partition=none -fuse-linker-plugin -fno-fat-lto-objects
-PASS: gcc.dg/lto/pr52634 c_lto_pr52634_1.o assemble, -O2 -flto -flto-partition=none -fuse-linker-plugin -fno-fat-lto-objects
-PASS: gcc.dg/lto/pr52634 c_lto_pr52634_0.o-c_lto_pr52634_1.o link, -O2 -flto -flto-partition=none -fuse-linker-plugin -fno-fat-lto-objects
-PASS: gcc.dg/lto/pr52634 c_lto_pr52634_0.o assemble, -O0 -flto -flto-partition=1to1 -fno-use-linker-plugin
-PASS: gcc.dg/lto/pr52634 c_lto_pr52634_1.o assemble, -O0 -flto -flto-partition=1to1 -fno-use-linker-plugin
-PASS: gcc.dg/lto/pr52634 c_lto_pr52634_0.o-c_lto_pr52634_1.o link, -O0 -flto -flto-partition=1to1 -fno-use-linker-plugin
-PASS: gcc.dg/lto/pr52634 c_lto_pr52634_0.o assemble, -O2 -flto -flto-partition=1to1 -fno-use-linker-plugin
-PASS: gcc.dg/lto/pr52634 c_lto_pr52634_1.o assemble, -O2 -flto -flto-partition=1to1 -fno-use-linker-plugin
-PASS: gcc.dg/lto/pr52634 c_lto_pr52634_0.o-c_lto_pr52634_1.o link, -O2 -flto -flto-partition=1to1 -fno-use-linker-plugin
-PASS: gcc.dg/lto/pr52634 c_lto_pr52634_0.o assemble, -O0 -flto -fuse-linker-plugin -fno-fat-lto-objects
-PASS: gcc.dg/lto/pr52634 c_lto_pr52634_1.o assemble, -O0 -flto -fuse-linker-plugin -fno-fat-lto-objects
-PASS: gcc.dg/lto/pr52634 c_lto_pr52634_0.o-c_lto_pr52634_1.o link, -O0 -flto -fuse-linker-plugin -fno-fat-lto-objects
-PASS: gcc.dg/lto/pr52634 c_lto_pr52634_0.o assemble, -O2 -flto -fuse-linker-plugin
-PASS: gcc.dg/lto/pr52634 c_lto_pr52634_1.o assemble, -O2 -flto -fuse-linker-plugin
-PASS: gcc.dg/lto/pr52634 c_lto_pr52634_0.o-c_lto_pr52634_1.o link, -O2 -flto -fuse-linker-plugin
+PASS: gcc.dg/lto/pr52634 c_lto_pr52634_0.o assemble, -flto
+PASS: gcc.dg/lto/pr52634 c_lto_pr52634_1.o assemble, -flto
+PASS: gcc.dg/lto/pr52634 c_lto_pr52634_0.o-c_lto_pr52634_1.o link, -flto
+PASS: gcc.dg/lto/pr52634 c_lto_pr52634_0.o assemble, -r
+PASS: gcc.dg/lto/pr52634 c_lto_pr52634_1.o assemble, -r
+PASS: gcc.dg/lto/pr52634 c_lto_pr52634_0.o-c_lto_pr52634_1.o link, -r
+PASS: gcc.dg/lto/pr52634 c_lto_pr52634_0.o assemble, -flto-partition=1to1
+PASS: gcc.dg/lto/pr52634 c_lto_pr52634_1.o assemble, -flto-partition=1to1
+PASS: gcc.dg/lto/pr52634 c_lto_pr52634_0.o-c_lto_pr52634_1.o link, -flto-partition=1to1
I however assume the original idea however has not been to run variants
'-flto', '-r', '-flto-partition=1to1' individually, but rather to run one
variant '-flto -r -flto-partition=1to1'.
gcc/testsuite/
* gcc.dg/lto/pr52634_0.c: Further adjust 'dg-lto-options'.
---
gcc/testsuite/gcc.dg/lto/pr52634_0.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/gcc/testsuite/gcc.dg/lto/pr52634_0.c b/gcc/testsuite/gcc.dg/lto/pr52634_0.c
index 7731abf4bc98..ad4728f03397 100644
--- a/gcc/testsuite/gcc.dg/lto/pr52634_0.c
+++ b/gcc/testsuite/gcc.dg/lto/pr52634_0.c
@@ -1,7 +1,7 @@
/* { dg-require-weak "" } */
/* { dg-require-alias "" } */
/* { dg-lto-do link } */
-/* { dg-lto-options {-flto -r -flto-partition=1to1} } */
+/* { dg-lto-options { { -flto -r -flto-partition=1to1 } } } */
/* { dg-extra-ld-options "-flinker-output=nolto-rel" } */
extern int cfliteValueCallBacks;
void baz (int *);
--
2.27.0