This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[LTO] rename custom testsuite directives, other tweaks


This patch to the LTO branch renames the overridden test directives
dg-do and dg-options to dg-lto-do and dg-lto-options and documents
them.  It also replaces the use of "compile" for dg-lto-do with
"assemble" to match the meanings of those actions in dg-do.  The new
dg-lto-do does not handle target or xfail lists, so the tests that
currently try to use those have been modified to use dg-skip-if, and
the documentation for dg-lto-do says to use other test directives
to skip or xfail tests for specific targets.

Tested with the lto branch, originally with all languages but Ada
and more recently just with C and C++.  OK for the lto branch?
I don't have a writable tree for that branch so if it's OK it would
be nice if an LTO developer checks it in.

2009-06-24  Janis Johnson  <janis187@us.ibm.com>

gcc/
	* doc/sourcebuild.texi (LTO Testing): New.

testsuite/
	* lib/lto.exp (proc_lto_obj): Use assemble, not compile.
	(lto-get-options-main): Handle dg-lto-options instead of dg-options
	and dg-lto-do instead of dg-do.  Use "assemble" instead of "compile"
	with dg-lto-do.
	* lib/gcc-dg.exp (gcc-dg-runtest): Use less confusing syntax for
	an empty list.
	* gcc.dg/lto/README: Use assemble instead of compile.
	* gcc.dg/lto/20090206-1_0.c: Use dg-lto-link, dg-lto-options; add
	dg-skip-if.
	* gcc.dg/lto/20090206-2_0.c: Ditto.
	* gcc.dg/lto/20081115_0.c: Use renamed option.
	* gcc.dg/lto/20081118_0.c: Ditto.
	* gcc.dg/lto/20080908_0.c: Ditto.
	* gcc.dg/lto/20081120-1_0.c: Ditto.
	* gcc.dg/lto/20081201-1_0.c: Ditto.
	* gcc.dg/lto/20081120-2_0.c: Ditto.
	* gcc.dg/lto/20081201-2_0.c: Ditto.
	* gcc.dg/lto/20090312_0.c: Ditto.
	* gcc.dg/lto/20090116_0.c: Ditto.
	* gcc.dg/lto/20081126_0.c: Use renamed options and dg-skip-if.
	* gcc.dg/lto/20080917_0.c: Use renamed option.
	* gcc.dg/lto/20090120_0.c: Ditto.
	* gcc.dg/lto/20081212-1_0.c: Ditto.
	* gcc.dg/lto/20090126-1_0.c: Ditto.
	* gcc.dg/lto/20090126-2_0.c: Ditto.
	* gcc.dg/lto/20080924_0.c: Ditto.
	* gcc.dg/lto/20081202-1_0.c: Ditto.
	* gcc.dg/lto/20090210_0.c: Ditto.
	* gcc.dg/lto/20081202-2_0.c: Ditto.
	* gcc.dg/lto/20081204-1_0.c: Ditto.
	* gcc.dg/lto/20081204-2_0.c: Use renamed options and dg-skip-if.
	* gcc.dg/lto/20090213_0.c: Use renamed option.
	* gcc.dg/lto/20081024_0.c: Ditto.
	* gcc.dg/lto/20081224_0.c: Ditto.
	* gcc.dg/lto/20081109_0.c: Ditto.
	* gcc.dg/lto/20090219_0.c: Ditto.
	* g++.dg/lto/20081120-1_0.C: Ditto.
	* g++.dg/lto/20081120-2_0.C: Ditto.
	* g++.dg/lto/20090311-1_0.C: Ditto.
	* g++.dg/lto/20090112_0.C: Ditto.
	* g++.dg/lto/20081123_0.C: Ditto.
	* g++.dg/lto/20080910-1_0.C: Ditto.
	* g++.dg/lto/20090313_0.C: Ditto.
	* g++.dg/lto/20081125_0.C: Ditto.
	* g++.dg/lto/20081008_0.C: Ditto.
	* g++.dg/lto/20081109-1_0.C: Ditto.
	* g++.dg/lto/20080912-1_0.C: Ditto.
	* g++.dg/lto/20081109-2_0.C: Ditto.
	* g++.dg/lto/20090315_0.C: Ditto.
	* g++.dg/lto/20081209_0.C: Ditto.
	* g++.dg/lto/20080912_0.C: Ditto.
	* g++.dg/lto/20080915_0.C: Ditto.
	* g++.dg/lto/20080916_0.C: Ditto.
	* g++.dg/lto/20080917_0.C: Ditto.
	* g++.dg/lto/20081118-1_0.C: Ditto.
	* g++.dg/lto/20090128_0.C: Ditto.
	* g++.dg/lto/20081219_0.C: Ditto.
	* g++.dg/lto/20080924_0.C: Ditto.
	* g++.dg/lto/20080908-1_0.C: Ditto.
	* g++.dg/lto/20080908-2_0.C: Ditto.
	* g++.dg/lto/20080926_0.C: Ditto.
	* g++.dg/lto/20080908-3_0.C: Ditto.
	* g++.dg/lto/20081204-1_0.C: Ditto.
	* g++.dg/lto/20081204-2_0.C: Ditto.
	* g++.dg/lto/20081023_0.C: Ditto.
	* g++.dg/lto/20090221_0.C: Ditto.
	* g++.dg/lto/20090302_0.C: Ditto.
	* g++.dg/lto/20090303_0.C: Ditto.
	* g++.dg/lto/20090106_0.C: Ditto.
	* g++.dg/lto/20081119-1_0.C: Ditto.
	* g++.dg/lto/20081118_0.C: Ditto.
	* g++.dg/lto/20080904_0.C: Ditto.
	* g++.dg/lto/20080909-1_0.C: Ditto.
	* g++.dg/lto/20080907_0.C: Ditto.
	* g++.dg/lto/20080709_0.C: Ditto.
	* g++.dg/lto/20080829_0.C: Ditto.

Index: gcc/doc/sourcebuild.texi
===================================================================
--- gcc/doc/sourcebuild.texi	(revision 148817)
+++ gcc/doc/sourcebuild.texi	(working copy)
@@ -820,6 +820,7 @@ here; FIXME: document the others.
 * Ada Tests::       The Ada language testsuites.
 * C Tests::         The C language testsuites.
 * libgcj Tests::    The Java library testsuites.
+* LTO Testing::     Support for testing link-time optimizations.
 * gcov Testing::    Support for testing gcov.
 * profopt Testing:: Support for testing profile-directed optimizations.
 * compat Testing::  Support for testing binary compatibility.
@@ -1346,6 +1347,42 @@ bugs in libgcj that had caused Mauve tes
 
 We encourage developers to contribute test cases to Mauve.
 
+@node LTO Testing
+@subsection Support for testing link-time optimizations
+
+Tests for link-time optimizations usually require multiple source files
+that are compiled separately, perhaps with different sets of options.
+There are several special-purpose test directives used for these tests.
+
+@table @code
+@item @{ dg-lto-do @var{do-what-keyword} @}
+@var{do-what-keyword} specifies how the test is compiled and whether
+it is executed.  It is one of:
+
+@table @code
+@item assemble
+Compile with @option{-c} to produce a relocatable object file.
+@item link
+Compile, assemble, and link to produce an executable file.
+@item run
+Produce and run an executable file, which is expected to return
+an exit code of 0.
+@end table
+
+The default is @code{assemble}.  That can be overridden for a set of
+tests by redefining @code{dg-do-what-default} within the @code{.exp}
+file for those tests.
+
+Unlike @code{dg-do}, @code{dg-lto-do} does not support an optional
+@samp{target} or @samp{xfail} list.  Use @code{dg-skip-if},
+@code{dg-xfail-if}, or @code{dg-xfail-run-if}.
+
+@item @{ dg-lto-options @{ @{ @var{options} @} [@{ @var{options} @}] @} [@{ target @var{selector} @}]@}
+This directive provides a list of one or more sets of compiler options
+to override @var{LTO_OPTIONS}.  Each test will be compiled and run with
+each of these sets of options.
+@end table
+
 @node gcov Testing
 @subsection Support for testing @command{gcov}
 
Index: gcc/testsuite/lib/lto.exp
===================================================================
--- gcc/testsuite/lib/lto.exp	(revision 148817)
+++ gcc/testsuite/lib/lto.exp	(working copy)
@@ -87,7 +87,7 @@ proc lto-obj { source dest optall optfil
 
     set compiler_conditional_xfail_data $xfaildata
     set comp_output [${tool}_target_compile "$source" "$dest" object $options]
-    ${tool}_check_compile "$testcase $dest compile" $optstr $dest $comp_output
+    ${tool}_check_compile "$testcase $dest assemble" $optstr $dest $comp_output
 }
 
 # lto-link-and-maybe-run -- link the object files and run the executable
@@ -171,8 +171,7 @@ proc lto-get-options-main { src } {
     foreach op $tmp {
 	set cmd [lindex $op 0]
 	verbose "cmd is $cmd"
-	if { ![string compare "dg-options" $cmd] \
-	     || [string match "dg-skip-if" $cmd] \
+	if { [string match "dg-skip-if" $cmd] \
 	     || [string match "dg-require-*" $cmd] } {
 	    set status [catch "$op" errmsg]
 	    if { $status != 0 } {
@@ -180,19 +179,28 @@ proc lto-get-options-main { src } {
 		unresolved "$src: $errmsg for \"$op\""
 		return
 	    }
-	} elseif { ![string compare "dg-xfail-if" $cmd] } {
+	} elseif { [string match "dg-lto-options" $cmd] } {
+	    set op [lreplace $op 0 0 "dg-options"]
+	    set status [catch "$op" errmsg]
+	    if { $status != 0 } {
+		perror "src: $errmsg for \"$op\"\n"
+		unresolved "$src: $errmsg for \"$op\""
+		return
+	    }
+	} elseif { ![string compare "dg-xfail-if" $cmd] \
+		   || ![string compare "dg-options" $cmd] } {
 	    warning "lto.exp does not support $cmd in primary source file"
-	} elseif { ![string compare "dg-do" $cmd] } {
+	} elseif { ![string compare "dg-lto-do" $cmd] } {
 	    set dgdo [lindex $op 2]
-	    verbose "dg-do command for \"$op\" is $dgdo"
-	    if { ![string compare "compile" $dgdo] } {
-		set compile_type "compile"
+	    verbose "dg-lto-do command for \"$op\" is $dgdo"
+	    if { ![string compare "assemble" $dgdo] } {
+		set compile_type "assemble"
 	    } elseif { ![string compare "run" $dgdo] } {
 		set compile_type "run"
 	    } elseif { ![string compare "link" $dgdo] } {
 		set compile_type "link"
 	    } else {
-		warning "lto.exp does not support dg-do $dgdo"
+		warning "lto.exp does not support dg-lto-do $dgdo"
 	    }
 	} elseif { ![string compare "dg-extra-ld-options" $cmd] } {
 	    set dg-extra-ld-options [lindex $op 2]
Index: gcc/testsuite/lib/gcc-dg.exp
===================================================================
--- gcc/testsuite/lib/gcc-dg.exp	(revision 148817)
+++ gcc/testsuite/lib/gcc-dg.exp	(working copy)
@@ -256,7 +256,7 @@ proc gcc-dg-runtest { testcases default-
     if { $existing_torture_options == 0 } {
 	global DG_TORTURE_OPTIONS LTO_TORTURE_OPTIONS
 	torture-init
-	set-torture-options $DG_TORTURE_OPTIONS {{}} $LTO_TORTURE_OPTIONS
+	set-torture-options $DG_TORTURE_OPTIONS [list {}] $LTO_TORTURE_OPTIONS
     }
     dump-torture-options
 
Index: gcc/testsuite/gcc.dg/lto/README
===================================================================
--- gcc/testsuite/gcc.dg/lto/README	(revision 148817)
+++ gcc/testsuite/gcc.dg/lto/README	(working copy)
@@ -24,9 +24,9 @@ $ g++ -o <executable> a_0.o a_1.o a_2.o
 Tests that do not need more than one file are a special case
 where there is a single file named 'foo_0.C'.
 
-The only supported dg-do option are 'compile', 'run' and 'link'.
+The only supported dg-do option are 'assemble', 'run' and 'link'.
 Additionally, these can only be used in the main file.  If
-'compile' is used, only the individual object files are
+'assemble' is used, only the individual object files are
 generated.  If 'link' is used, the final executable is generated
 but not executed (in this case, function main() needs to exist
 but it does not need to do anything).  If 'run' is used, the
Index: gcc/testsuite/gcc.dg/lto/20090206-1_0.c
===================================================================
--- gcc/testsuite/gcc.dg/lto/20090206-1_0.c	(revision 148817)
+++ gcc/testsuite/gcc.dg/lto/20090206-1_0.c	(working copy)
@@ -1,5 +1,6 @@
-/* { dg-do link { target i?86-*-linux* x86_64-*-linux* } } */
-/* { dg-options "{-fPIC -shared -fwhopr -msse2}" } */
+/* { dg-lto-do link } */
+/* { dg-skip-if "" { ! { i?86-*-linux* x86_64-*-linux* } } { "*" } { "" } } */
+/* { dg-lto-options {{-fPIC -shared -fwhopr -msse2}} } */
 /* { dg-suppress-ld-options {-fPIC -msse2} } */
 
 typedef short v8hi __attribute__((__vector_size__(16)));
Index: gcc/testsuite/gcc.dg/lto/20090206-2_0.c
===================================================================
--- gcc/testsuite/gcc.dg/lto/20090206-2_0.c	(revision 148817)
+++ gcc/testsuite/gcc.dg/lto/20090206-2_0.c	(working copy)
@@ -1,5 +1,6 @@
-/* { dg-do link { target i?86-*-linux* x86_64-*-linux* } } */
-/* { dg-options "{-fwhopr -fPIC}" } */
+/* { dg-lto-do link } */
+/* { dg-skip-if "" { ! { i?86-*-linux* x86_64-*-linux* } } { "*" } { "" } } */
+/* { dg-lto-options {{-fwhopr -fPIC}} } */
 /* { dg-suppress-ld-options {-fPIC} } */
 
 void func(int n) {
Index: gcc/testsuite/gcc.dg/lto/20081115_0.c
===================================================================
--- gcc/testsuite/gcc.dg/lto/20081115_0.c	(revision 148817)
+++ gcc/testsuite/gcc.dg/lto/20081115_0.c	(working copy)
@@ -1,4 +1,4 @@
-/* { dg-options "{-O2 -DOPTIMIZE -fwhopr} {-O0 -fwhopr}" } */
+/* { dg-lto-options {{-O2 -DOPTIMIZE -fwhopr} {-O0 -fwhopr}} } */
 
 extern void abort (void);
 
Index: gcc/testsuite/gcc.dg/lto/20081118_0.c
===================================================================
--- gcc/testsuite/gcc.dg/lto/20081118_0.c	(revision 148817)
+++ gcc/testsuite/gcc.dg/lto/20081118_0.c	(working copy)
@@ -1,4 +1,4 @@
-/* { dg-options "{-O2 -DOPTIMIZE -fwhopr} {-O0 -fwhopr}" } */
+/* { dg-lto-options {{-O2 -DOPTIMIZE -fwhopr} {-O0 -fwhopr}} } */
 
 extern void abort (void);
 extern int f (void);
Index: gcc/testsuite/gcc.dg/lto/20080908_0.c
===================================================================
--- gcc/testsuite/gcc.dg/lto/20080908_0.c	(revision 148817)
+++ gcc/testsuite/gcc.dg/lto/20080908_0.c	(working copy)
@@ -1,4 +1,4 @@
-/* { dg-do compile } */
+/* { dg-lto-do assemble } */
 void foo(void) {
  char *bar;
  int baz;
Index: gcc/testsuite/gcc.dg/lto/20081120-1_0.c
===================================================================
--- gcc/testsuite/gcc.dg/lto/20081120-1_0.c	(revision 148817)
+++ gcc/testsuite/gcc.dg/lto/20081120-1_0.c	(working copy)
@@ -1,5 +1,5 @@
-/* { dg-do link } */
-/* { dg-options "{-flto -shared}" } */
+/* { dg-lto-do link } */
+/* { dg-lto-options {{-flto -shared}} } */
 extern int stat(void) __asm__("" "stat64");
 extern inline int stat(void) { }
 static void foo(void) { stat(); }
Index: gcc/testsuite/gcc.dg/lto/20081201-1_0.c
===================================================================
--- gcc/testsuite/gcc.dg/lto/20081201-1_0.c	(revision 148817)
+++ gcc/testsuite/gcc.dg/lto/20081201-1_0.c	(working copy)
@@ -1,4 +1,4 @@
-/* { dg-options "{-O2 -DOPTIMIZE -fwhopr} {-O0 -fwhopr}" } */
+/* { dg-lto-options {{-O2 -DOPTIMIZE -fwhopr} {-O0 -fwhopr}} } */
 
 extern void abort (void);
 
Index: gcc/testsuite/gcc.dg/lto/20081120-2_0.c
===================================================================
--- gcc/testsuite/gcc.dg/lto/20081120-2_0.c	(revision 148817)
+++ gcc/testsuite/gcc.dg/lto/20081120-2_0.c	(working copy)
@@ -1,3 +1,3 @@
-/* { dg-do link } */
-/* { dg-options "{-fwhopr -shared}" } */
+/* { dg-lto-do link } */
+/* { dg-lto-options {{-fwhopr -shared}} } */
 void bar(void) {}
Index: gcc/testsuite/gcc.dg/lto/20081201-2_0.c
===================================================================
--- gcc/testsuite/gcc.dg/lto/20081201-2_0.c	(revision 148817)
+++ gcc/testsuite/gcc.dg/lto/20081201-2_0.c	(working copy)
@@ -1,4 +1,4 @@
-/* { dg-options "{-O3 -fwhopr}" } */
+/* { dg-lto-options {{-O3 -fwhopr}} } */
 
 /* Test that cross-TU inlining works.  */
 
Index: gcc/testsuite/gcc.dg/lto/20090312_0.c
===================================================================
--- gcc/testsuite/gcc.dg/lto/20090312_0.c	(revision 148817)
+++ gcc/testsuite/gcc.dg/lto/20090312_0.c	(working copy)
@@ -1,4 +1,4 @@
-/* { dg-do link } */
+/* { dg-lto-do link } */
 extern int **foo (void);
 extern void mumble (char*, char*, char*);
 
Index: gcc/testsuite/gcc.dg/lto/20090116_0.c
===================================================================
--- gcc/testsuite/gcc.dg/lto/20090116_0.c	(revision 148817)
+++ gcc/testsuite/gcc.dg/lto/20090116_0.c	(working copy)
@@ -1,5 +1,5 @@
-/* { dg-do link } */
-/* { dg-options "{-O1 -fwhopr -fPIC}" } */
+/* { dg-lto-do link } */
+/* { dg-lto-options {{-O1 -fwhopr -fPIC}} } */
 /* { dg-extra-ld-options {-shared -O0} } */
 
 int foo(void) {
Index: gcc/testsuite/gcc.dg/lto/20081126_0.c
===================================================================
--- gcc/testsuite/gcc.dg/lto/20081126_0.c	(revision 148817)
+++ gcc/testsuite/gcc.dg/lto/20081126_0.c	(working copy)
@@ -1,5 +1,6 @@
-/* { dg-do link { target i?86-*-* x86_64-*-* } } */
-/* { dg-options "{-flto -shared}" } */
+/* { dg-lto-do link } */
+/* { dg-skip-if "" { ! { i?86-*-* x86_64-*-* } } { "*" } { "" } } */
+/* { dg-lto-options {{-flto -shared}} } */
 
 int f(void) {
   register int ri asm("edi");
Index: gcc/testsuite/gcc.dg/lto/20080917_0.c
===================================================================
--- gcc/testsuite/gcc.dg/lto/20080917_0.c	(revision 148817)
+++ gcc/testsuite/gcc.dg/lto/20080917_0.c	(working copy)
@@ -1,5 +1,5 @@
-/* { dg-do compile }  */
-/* { dg-options "{-O2 -funsigned-char}" }  */ 
+/* { dg-lto-do assemble }  */
+/* { dg-lto-options {{-O2 -funsigned-char}} }  */ 
 int
 foo (char *s, int flag)
 {
Index: gcc/testsuite/gcc.dg/lto/20090120_0.c
===================================================================
--- gcc/testsuite/gcc.dg/lto/20090120_0.c	(revision 148817)
+++ gcc/testsuite/gcc.dg/lto/20090120_0.c	(working copy)
@@ -1,4 +1,4 @@
-/* { dg-options "{-flto -funsigned-char}" } */
+/* { dg-lto-options {{-flto -funsigned-char}} } */
 
 extern void abort ();
 
Index: gcc/testsuite/gcc.dg/lto/20081212-1_0.c
===================================================================
--- gcc/testsuite/gcc.dg/lto/20081212-1_0.c	(revision 148817)
+++ gcc/testsuite/gcc.dg/lto/20081212-1_0.c	(working copy)
@@ -1,4 +1,4 @@
-/* { dg-do link } */
-/* { dg-options "{-shared}" } */
+/* { dg-lto-do link } */
+/* { dg-lto-options {{-shared}} } */
 int exported_var = 42;
 /* { dg-final { scan-symbol "exported_var" } } */
Index: gcc/testsuite/gcc.dg/lto/20090126-1_0.c
===================================================================
--- gcc/testsuite/gcc.dg/lto/20090126-1_0.c	(revision 148817)
+++ gcc/testsuite/gcc.dg/lto/20090126-1_0.c	(working copy)
@@ -1,5 +1,5 @@
-/* { dg-do link } */
-/* { dg-options "{-O0 -fwhopr}" } */
+/* { dg-lto-do link } */
+/* { dg-lto-options {{-O0 -fwhopr}} } */
 /* { dg-extra-ld-options {-shared -O2 -fwhopr} } */
 
 int main(int argc, char **argv) {
Index: gcc/testsuite/gcc.dg/lto/20090126-2_0.c
===================================================================
--- gcc/testsuite/gcc.dg/lto/20090126-2_0.c	(revision 148817)
+++ gcc/testsuite/gcc.dg/lto/20090126-2_0.c	(working copy)
@@ -1,5 +1,5 @@
-/* { dg-do link } */
-/* { dg-options "{-fPIC -O2 -fwhopr}" } */
+/* { dg-lto-do link } */
+/* { dg-lto-options {{-fPIC -O2 -fwhopr}} } */
 /* { dg-extra-ld-options {-fno-PIC -shared -O2 -fwhopr} } */
 
 int main(int argc, char **argv) {
Index: gcc/testsuite/gcc.dg/lto/20080924_0.c
===================================================================
--- gcc/testsuite/gcc.dg/lto/20080924_0.c	(revision 148817)
+++ gcc/testsuite/gcc.dg/lto/20080924_0.c	(working copy)
@@ -1,5 +1,5 @@
-/* { dg-do compile }  */
-/* { dg-options "{-O2 -flto -funsigned-char}" }  */ 
+/* { dg-lto-do assemble }  */
+/* { dg-lto-options {{-O2 -flto -funsigned-char}} }  */ 
 typedef unsigned int size_t;
 foo (const char *src, unsigned char *dst, size_t size)
 {
Index: gcc/testsuite/gcc.dg/lto/20081202-1_0.c
===================================================================
--- gcc/testsuite/gcc.dg/lto/20081202-1_0.c	(revision 148817)
+++ gcc/testsuite/gcc.dg/lto/20081202-1_0.c	(working copy)
@@ -1,4 +1,4 @@
-/* { dg-options "{-fwhopr -O3}" } */
+/* { dg-lto-options {{-fwhopr -O3}} } */
 
 extern void exit (int);
 extern void foo (void);
Index: gcc/testsuite/gcc.dg/lto/20090210_0.c
===================================================================
--- gcc/testsuite/gcc.dg/lto/20090210_0.c	(revision 148817)
+++ gcc/testsuite/gcc.dg/lto/20090210_0.c	(working copy)
@@ -1,4 +1,4 @@
-/* { dg-do run }  */
+/* { dg-lto-do run }  */
 /* { dg-suppress-ld-options {-fPIC} }  */
 int foo (int x)
 {
Index: gcc/testsuite/gcc.dg/lto/20081202-2_0.c
===================================================================
--- gcc/testsuite/gcc.dg/lto/20081202-2_0.c	(revision 148817)
+++ gcc/testsuite/gcc.dg/lto/20081202-2_0.c	(working copy)
@@ -1,4 +1,4 @@
-/* { dg-options "{-fwhopr -O3}" } */
+/* { dg-lto-options {{-fwhopr -O3}} } */
 
 extern void exit (int);
 extern void *foo (void);
Index: gcc/testsuite/gcc.dg/lto/20081204-1_0.c
===================================================================
--- gcc/testsuite/gcc.dg/lto/20081204-1_0.c	(revision 148817)
+++ gcc/testsuite/gcc.dg/lto/20081204-1_0.c	(working copy)
@@ -1,5 +1,5 @@
-/* { dg-do link } */
-/* { dg-options "{-fwhopr -fPIC -shared}" } */
+/* { dg-lto-do link } */
+/* { dg-lto-options {{-fwhopr -fPIC -shared}} } */
 
 /* Tests for the absence during linking of:
    lto1: error: type of 'i' does not match original declaration  */
Index: gcc/testsuite/gcc.dg/lto/20081204-2_0.c
===================================================================
--- gcc/testsuite/gcc.dg/lto/20081204-2_0.c	(revision 148817)
+++ gcc/testsuite/gcc.dg/lto/20081204-2_0.c	(working copy)
@@ -1,4 +1,5 @@
-/* { dg-do link { target i?86-*-* x86_64-*-* } } */
-/* { dg-options "{-w -flto -fPIC -shared}" } */
+/* { dg-lto-do link } */
+/* { dg-skip-if "" { ! { i?86-*-* x86_64-*-* } } { "*" } { "" } } */
+/* { dg-lto-options {{-w -flto -fPIC -shared}} } */
 
 register int ri asm("edi");
Index: gcc/testsuite/gcc.dg/lto/20090213_0.c
===================================================================
--- gcc/testsuite/gcc.dg/lto/20090213_0.c	(revision 148817)
+++ gcc/testsuite/gcc.dg/lto/20090213_0.c	(working copy)
@@ -1,4 +1,4 @@
-/* { dg-do run } */
+/* { dg-lto-do run } */
 #include <stdio.h>
 
 extern int foo (int);
Index: gcc/testsuite/gcc.dg/lto/20081024_0.c
===================================================================
--- gcc/testsuite/gcc.dg/lto/20081024_0.c	(revision 148817)
+++ gcc/testsuite/gcc.dg/lto/20081024_0.c	(working copy)
@@ -1,4 +1,4 @@
-/* { dg-do run } */
+/* { dg-lto-do run } */
 
 #include <stdarg.h>
 #include <stdio.h>
Index: gcc/testsuite/gcc.dg/lto/20081224_0.c
===================================================================
--- gcc/testsuite/gcc.dg/lto/20081224_0.c	(revision 148817)
+++ gcc/testsuite/gcc.dg/lto/20081224_0.c	(working copy)
@@ -1,5 +1,5 @@
-/* { dg-do link } */
-/* { dg-options "{-fwhopr -shared -fPIC}" } */
+/* { dg-lto-do link } */
+/* { dg-lto-options {{-fwhopr -shared -fPIC}} } */
 #include "20081224_0.h"
 
 extern struct foo x;
Index: gcc/testsuite/gcc.dg/lto/20081109_0.c
===================================================================
--- gcc/testsuite/gcc.dg/lto/20081109_0.c	(revision 148817)
+++ gcc/testsuite/gcc.dg/lto/20081109_0.c	(working copy)
@@ -1,3 +1,3 @@
-/* { dg-do compile } */
-/* { dg-options "{-w -flto}" }  */
+/* { dg-lto-do assemble } */
+/* { dg-lto-options {{-w -flto}} }  */
 void Foo(void) { char bar[1]; free(bar); }
Index: gcc/testsuite/gcc.dg/lto/20090219_0.c
===================================================================
--- gcc/testsuite/gcc.dg/lto/20090219_0.c	(revision 148817)
+++ gcc/testsuite/gcc.dg/lto/20090219_0.c	(working copy)
@@ -1,5 +1,5 @@
-/* { dg-do link } */
-/* { dg-options "{-O3 -fwhopr -fPIC -shared}" } */
+/* { dg-lto-do link } */
+/* { dg-lto-options {{-O3 -fwhopr -fPIC -shared}} } */
 
 struct Foo { int f1, f2, f3, f4, f5; };
 
Index: gcc/testsuite/g++.dg/lto/20081120-1_0.C
===================================================================
--- gcc/testsuite/g++.dg/lto/20081120-1_0.C	(revision 148817)
+++ gcc/testsuite/g++.dg/lto/20081120-1_0.C	(working copy)
@@ -1,5 +1,5 @@
-// { dg-do link }
-// { dg-options "{-flto -shared}" }
+// { dg-lto-do link }
+// { dg-lto-options {{-flto -shared}} }
 extern "C"
 {
  extern __inline __attribute__((__gnu_inline__)) int pthread_equal(int, int)
Index: gcc/testsuite/g++.dg/lto/20081120-2_0.C
===================================================================
--- gcc/testsuite/g++.dg/lto/20081120-2_0.C	(revision 148817)
+++ gcc/testsuite/g++.dg/lto/20081120-2_0.C	(working copy)
@@ -1,5 +1,5 @@
-// { dg-do link }
-// { dg-options "{-flto -shared}" }
+// { dg-lto-do link }
+// { dg-lto-options {{-flto -shared}} }
 template < typename > struct Foo
 {
  inline void rdstate() {
Index: gcc/testsuite/g++.dg/lto/20090311-1_0.C
===================================================================
--- gcc/testsuite/g++.dg/lto/20090311-1_0.C	(revision 148817)
+++ gcc/testsuite/g++.dg/lto/20090311-1_0.C	(working copy)
@@ -1,4 +1,4 @@
-/* { dg-do run }  */
+/* { dg-lto-do run }  */
 #include "20090311-1.h"
 bool flag;
 
Index: gcc/testsuite/g++.dg/lto/20090112_0.C
===================================================================
--- gcc/testsuite/g++.dg/lto/20090112_0.C	(revision 148817)
+++ gcc/testsuite/g++.dg/lto/20090112_0.C	(working copy)
@@ -1,4 +1,4 @@
-// { dg-do run }
+// { dg-lto-do run }
 const char *func(int val) {
  switch (val) {
    case 2147483647: return "foo";
Index: gcc/testsuite/g++.dg/lto/20081123_0.C
===================================================================
--- gcc/testsuite/g++.dg/lto/20081123_0.C	(revision 148817)
+++ gcc/testsuite/g++.dg/lto/20081123_0.C	(working copy)
@@ -1,5 +1,5 @@
-// { dg-do link }
-// { dg-options "{-fwhopr -shared -fPIC}" }
+// { dg-lto-do link }
+// { dg-lto-options {{-fwhopr -shared -fPIC}} }
 
 int
 f(void)
Index: gcc/testsuite/g++.dg/lto/20080910-1_0.C
===================================================================
--- gcc/testsuite/g++.dg/lto/20080910-1_0.C	(revision 148817)
+++ gcc/testsuite/g++.dg/lto/20080910-1_0.C	(working copy)
@@ -1,2 +1,2 @@
-// { dg-do compile }
+// { dg-lto-do assemble }
 struct Foo { Foo(int); }; void func() { new Foo(0); }
Index: gcc/testsuite/g++.dg/lto/20090313_0.C
===================================================================
--- gcc/testsuite/g++.dg/lto/20090313_0.C	(revision 148817)
+++ gcc/testsuite/g++.dg/lto/20090313_0.C	(working copy)
@@ -1,5 +1,5 @@
-// { dg-do "link" }
-// { dg-options "{-fwhopr -fPIC}" }
+// { dg-lto-do link }
+// { dg-lto-options {{-fwhopr -fPIC}} }
 // { dg-extra-ld-options "-fwhopr -shared" }
 
 int X;
Index: gcc/testsuite/g++.dg/lto/20081125_0.C
===================================================================
--- gcc/testsuite/g++.dg/lto/20081125_0.C	(revision 148817)
+++ gcc/testsuite/g++.dg/lto/20081125_0.C	(working copy)
@@ -1,5 +1,5 @@
-// { dg-do link }
-// { dg-options "{-fwhopr}" }
+// { dg-lto-do link }
+// { dg-lto-options {{-fwhopr}} }
 #include "20081125.h"
 
 object::object (int x)
Index: gcc/testsuite/g++.dg/lto/20081008_0.C
===================================================================
--- gcc/testsuite/g++.dg/lto/20081008_0.C	(revision 148817)
+++ gcc/testsuite/g++.dg/lto/20081008_0.C	(working copy)
@@ -1,5 +1,5 @@
-// { dg-do compile }
-// { dg-options "-flto" }
+// { dg-lto-do assemble }
+// { dg-lto-options {{-flto}} }
 
 struct Foo
 {
Index: gcc/testsuite/g++.dg/lto/20081109-1_0.C
===================================================================
--- gcc/testsuite/g++.dg/lto/20081109-1_0.C	(revision 148817)
+++ gcc/testsuite/g++.dg/lto/20081109-1_0.C	(working copy)
@@ -1,5 +1,5 @@
-// { dg-do link }
-// { dg-options "{-fPIC -fwhopr}" }
+// { dg-lto-do link }
+// { dg-lto-options {{-fPIC -fwhopr}} }
 // { dg-extra-ld-options "-fPIC -fwhopr -shared -fno-exceptions" }
 void func(); class Foo { };
 void bar() { try { func(); } catch (Foo) { } };
Index: gcc/testsuite/g++.dg/lto/20080912-1_0.C
===================================================================
--- gcc/testsuite/g++.dg/lto/20080912-1_0.C	(revision 148817)
+++ gcc/testsuite/g++.dg/lto/20080912-1_0.C	(working copy)
@@ -1,3 +1,3 @@
-// { dg-do compile }
+// { dg-lto-do assemble }
 struct Foo { double x[3]; };
 Foo func() { Foo f = { { 0, 0, 0 } }; return f; }
Index: gcc/testsuite/g++.dg/lto/20081109-2_0.C
===================================================================
--- gcc/testsuite/g++.dg/lto/20081109-2_0.C	(revision 148817)
+++ gcc/testsuite/g++.dg/lto/20081109-2_0.C	(working copy)
@@ -1,4 +1,4 @@
-/* { dg-do compile }  */
+/* { dg-lto-do assemble }  */
 extern void func(int);
 
 struct Foo
Index: gcc/testsuite/g++.dg/lto/20090315_0.C
===================================================================
--- gcc/testsuite/g++.dg/lto/20090315_0.C	(revision 148817)
+++ gcc/testsuite/g++.dg/lto/20090315_0.C	(working copy)
@@ -1,4 +1,4 @@
-// { dg-do run }
+// { dg-lto-do run }
 struct Foo {
   bool Mumble() { return true; }
   static void Bar() { if (foo_->Mumble()) foo_ = 0; }
Index: gcc/testsuite/g++.dg/lto/20081209_0.C
===================================================================
--- gcc/testsuite/g++.dg/lto/20081209_0.C	(revision 148817)
+++ gcc/testsuite/g++.dg/lto/20081209_0.C	(working copy)
@@ -1,4 +1,4 @@
-/* { dg-do link } */
+/* { dg-lto-do link } */
 
 class foo {
  public:
Index: gcc/testsuite/g++.dg/lto/20080912_0.C
===================================================================
--- gcc/testsuite/g++.dg/lto/20080912_0.C	(revision 148817)
+++ gcc/testsuite/g++.dg/lto/20080912_0.C	(working copy)
@@ -1,4 +1,4 @@
-// { dg-do compile }
+// { dg-lto-do assemble }
 class Foo { virtual void f(); };
 class Bar:public Foo { };
 void func() { Bar(); }
Index: gcc/testsuite/g++.dg/lto/20080915_0.C
===================================================================
--- gcc/testsuite/g++.dg/lto/20080915_0.C	(revision 148817)
+++ gcc/testsuite/g++.dg/lto/20080915_0.C	(working copy)
@@ -1,4 +1,4 @@
-// { dg-do compile }
+// { dg-lto-do assemble }
 struct Foo {
  static const int dummy;
 
Index: gcc/testsuite/g++.dg/lto/20080916_0.C
===================================================================
--- gcc/testsuite/g++.dg/lto/20080916_0.C	(revision 148817)
+++ gcc/testsuite/g++.dg/lto/20080916_0.C	(working copy)
@@ -1,4 +1,4 @@
-/* { dg-do compile } */
+/* { dg-lto-do assemble } */
 
 enum _Ios_Fmtflags     {
  _S_boolalpha };
Index: gcc/testsuite/g++.dg/lto/20080917_0.C
===================================================================
--- gcc/testsuite/g++.dg/lto/20080917_0.C	(revision 148817)
+++ gcc/testsuite/g++.dg/lto/20080917_0.C	(working copy)
@@ -1,5 +1,5 @@
-// { dg-do compile }
-// { dg-options "{-O2 -flto -funsigned-char}" }
+// { dg-lto-do assemble }
+// { dg-lto-options {{-O2 -flto -funsigned-char}} }
 int
 foo (char *s, int flag)
 {
Index: gcc/testsuite/g++.dg/lto/20081118-1_0.C
===================================================================
--- gcc/testsuite/g++.dg/lto/20081118-1_0.C	(revision 148817)
+++ gcc/testsuite/g++.dg/lto/20081118-1_0.C	(working copy)
@@ -1,4 +1,4 @@
-/* { dg-do "link" } */
+/* { dg-lto-do link } */
 
 class C {
  public:
Index: gcc/testsuite/g++.dg/lto/20090128_0.C
===================================================================
--- gcc/testsuite/g++.dg/lto/20090128_0.C	(revision 148817)
+++ gcc/testsuite/g++.dg/lto/20090128_0.C	(working copy)
@@ -1,5 +1,5 @@
-// { dg-do compile }
-// { dg-options "{-fpreprocessed -O2 -fwhopr -funsigned-char}" }
+// { dg-lto-do assemble }
+// { dg-lto-options {{-fpreprocessed -O2 -fwhopr -funsigned-char}} }
 typedef unsigned char uint8;
 extern const uint8 array[256];
 static inline bool
Index: gcc/testsuite/g++.dg/lto/20081219_0.C
===================================================================
--- gcc/testsuite/g++.dg/lto/20081219_0.C	(revision 148817)
+++ gcc/testsuite/g++.dg/lto/20081219_0.C	(working copy)
@@ -1,5 +1,5 @@
-// { dg-do "link" }
-// { dg-options "{-fPIC -fwhopr -O2}" }
+// { dg-lto-do link }
+// { dg-lto-options {{-fPIC -fwhopr -O2}} }
 // { dg-extra-ld-options "-O2 -fPIC -fwhopr -shared" }
 
 typedef long int ptrdiff_t;
Index: gcc/testsuite/g++.dg/lto/20080924_0.C
===================================================================
--- gcc/testsuite/g++.dg/lto/20080924_0.C	(revision 148817)
+++ gcc/testsuite/g++.dg/lto/20080924_0.C	(working copy)
@@ -1,5 +1,5 @@
-// { dg-do compile }
-// { dg-options "{-O2 -flto -fno-strict-aliasing}" }
+// { dg-lto-do assemble }
+// { dg-lto-options {{-O2 -flto -fno-strict-aliasing}} }
 
 namespace ns
 {
Index: gcc/testsuite/g++.dg/lto/20080908-1_0.C
===================================================================
--- gcc/testsuite/g++.dg/lto/20080908-1_0.C	(revision 148817)
+++ gcc/testsuite/g++.dg/lto/20080908-1_0.C	(working copy)
@@ -1,4 +1,4 @@
-/* { dg-do run }  */
+/* { dg-lto-do run }  */
 extern "C" { extern void *memcpy (void *, const void *, unsigned); }
 
 inline int
Index: gcc/testsuite/g++.dg/lto/20080908-2_0.C
===================================================================
--- gcc/testsuite/g++.dg/lto/20080908-2_0.C	(revision 148817)
+++ gcc/testsuite/g++.dg/lto/20080908-2_0.C	(working copy)
@@ -1,3 +1,3 @@
-/* { dg-do compile }  */
+/* { dg-lto-do assemble }  */
 struct Foo { double x[3]; };
 Foo func() { Foo f = { { 0, 0, 0 } }; return f; }
Index: gcc/testsuite/g++.dg/lto/20080926_0.C
===================================================================
--- gcc/testsuite/g++.dg/lto/20080926_0.C	(revision 148817)
+++ gcc/testsuite/g++.dg/lto/20080926_0.C	(working copy)
@@ -1,4 +1,4 @@
-// { dg-do compile }
-// { dg-options "{-O2 -flto -fno-strict-aliasing}" }
+// { dg-lto-do assemble }
+// { dg-lto-options {{-O2 -flto -fno-strict-aliasing}} }
 extern int foo();
 void bar() { try { int i = foo(); } catch(int) { } }
Index: gcc/testsuite/g++.dg/lto/20080908-3_0.C
===================================================================
--- gcc/testsuite/g++.dg/lto/20080908-3_0.C	(revision 148817)
+++ gcc/testsuite/g++.dg/lto/20080908-3_0.C	(working copy)
@@ -1,4 +1,4 @@
-/* { dg-do run }  */
+/* { dg-lto-do run }  */
 
 int foo()
 {
Index: gcc/testsuite/g++.dg/lto/20081204-1_0.C
===================================================================
--- gcc/testsuite/g++.dg/lto/20081204-1_0.C	(revision 148817)
+++ gcc/testsuite/g++.dg/lto/20081204-1_0.C	(working copy)
@@ -1,5 +1,5 @@
-/* { dg-do link } */
-/* { dg-options "{-fwhopr -fPIC -shared}" } */
+/* { dg-lto-do link } */
+/* { dg-lto-options {{-fwhopr -fPIC -shared}} } */
 
 /* Tests for the absence during linking of:
    lto1: error: type of '_ZTVN10__cxxabiv120__si_class_type_infoE' does
Index: gcc/testsuite/g++.dg/lto/20081204-2_0.C
===================================================================
--- gcc/testsuite/g++.dg/lto/20081204-2_0.C	(revision 148817)
+++ gcc/testsuite/g++.dg/lto/20081204-2_0.C	(working copy)
@@ -1,5 +1,5 @@
-// { dg-do link }
-// { dg-options "{-fwhopr -O3}" }
+// { dg-lto-do link }
+// { dg-lto-options {{-fwhopr -O3}} }
 extern void foo (void);
 
 int
Index: gcc/testsuite/g++.dg/lto/20081023_0.C
===================================================================
--- gcc/testsuite/g++.dg/lto/20081023_0.C	(revision 148817)
+++ gcc/testsuite/g++.dg/lto/20081023_0.C	(working copy)
@@ -1,4 +1,4 @@
-// { dg-do "link" }
+// { dg-lto-do link }
 extern inline void __attribute__ ((__always_inline__)) func (void)
 {
 }
Index: gcc/testsuite/g++.dg/lto/20090221_0.C
===================================================================
--- gcc/testsuite/g++.dg/lto/20090221_0.C	(revision 148817)
+++ gcc/testsuite/g++.dg/lto/20090221_0.C	(working copy)
@@ -1,4 +1,4 @@
-// { dg-do compile }
+// { dg-lto-do assemble }
 extern void some_function (const char *);
 extern bool some_other_function ();
 
Index: gcc/testsuite/g++.dg/lto/20090302_0.C
===================================================================
--- gcc/testsuite/g++.dg/lto/20090302_0.C	(revision 148817)
+++ gcc/testsuite/g++.dg/lto/20090302_0.C	(working copy)
@@ -1,5 +1,5 @@
-/* { dg-do "link" } */
-/* { dg-options "{-fPIC -fwhopr -shared}" } */
+/* { dg-lto-do link } */
+/* { dg-lto-options {{-fPIC -fwhopr -shared}} } */
 struct Foo {
   bool Mumble();
   static void Bar() { if (foo_->Mumble()) foo_ = 0; }
Index: gcc/testsuite/g++.dg/lto/20090303_0.C
===================================================================
--- gcc/testsuite/g++.dg/lto/20090303_0.C	(revision 148817)
+++ gcc/testsuite/g++.dg/lto/20090303_0.C	(working copy)
@@ -1,5 +1,5 @@
-/* { dg-do run } */
-/* { dg-options "{-fwhopr -fPIC}" } */
+/* { dg-lto-do run } */
+/* { dg-lto-options {{-fwhopr -fPIC}} } */
 /* { dg-suppress-ld-options {-fPIC} }  */
 void foobar(int *, int* __x)    ;
 int test_ints[30];
Index: gcc/testsuite/g++.dg/lto/20090106_0.C
===================================================================
--- gcc/testsuite/g++.dg/lto/20090106_0.C	(revision 148817)
+++ gcc/testsuite/g++.dg/lto/20090106_0.C	(working copy)
@@ -1,4 +1,4 @@
-// { dg-do link }
+// { dg-lto-do link }
 typedef long unsigned int size_t;
 namespace std __attribute__ ((__visibility__ ("default"))) {
   using ::size_t;
Index: gcc/testsuite/g++.dg/lto/20081119-1_0.C
===================================================================
--- gcc/testsuite/g++.dg/lto/20081119-1_0.C	(revision 148817)
+++ gcc/testsuite/g++.dg/lto/20081119-1_0.C	(working copy)
@@ -1,5 +1,5 @@
-/* { dg-do "link" } */
-/* { dg-options "{-fPIC -fwhopr -shared}" } */
+/* { dg-lto-do link } */
+/* { dg-lto-options {{-fPIC -fwhopr -shared}} } */
 
 #include "20081119-1.h"
 
Index: gcc/testsuite/g++.dg/lto/20081118_0.C
===================================================================
--- gcc/testsuite/g++.dg/lto/20081118_0.C	(revision 148817)
+++ gcc/testsuite/g++.dg/lto/20081118_0.C	(working copy)
@@ -1,5 +1,5 @@
-/* { dg-do "link" } */
-/* { dg-options "{-fPIC -fwhopr -shared}" } */
+/* { dg-lto-do link } */
+/* { dg-lto-options {{-fPIC -fwhopr -shared}} } */
 
 /* We used to ICE because of dangling pointers.  */
 
Index: gcc/testsuite/g++.dg/lto/20080904_0.C
===================================================================
--- gcc/testsuite/g++.dg/lto/20080904_0.C	(revision 148817)
+++ gcc/testsuite/g++.dg/lto/20080904_0.C	(working copy)
@@ -1,4 +1,4 @@
-// { dg-do run }
+// { dg-lto-do run }
 
 /* This test will fail to link if the vtable for Derived is not emitted.  */
 
Index: gcc/testsuite/g++.dg/lto/20080909-1_0.C
===================================================================
--- gcc/testsuite/g++.dg/lto/20080909-1_0.C	(revision 148817)
+++ gcc/testsuite/g++.dg/lto/20080909-1_0.C	(working copy)
@@ -1,3 +1,3 @@
-// { dg-do compile }
-// { dg-options "-flto" }
+// { dg-lto-do assemble }
+// { dg-lto-options {{-flto}} }
 int *i = (int[]) {0};
Index: gcc/testsuite/g++.dg/lto/20080907_0.C
===================================================================
--- gcc/testsuite/g++.dg/lto/20080907_0.C	(revision 148817)
+++ gcc/testsuite/g++.dg/lto/20080907_0.C	(working copy)
@@ -1,3 +1,3 @@
-// { dg-do compile }
+// { dg-lto-do assemble }
 struct Foo { void func (); }; Foo & bar () { } struct Baz { Baz (Baz &); };
 Baz dummy() { bar().func(); }
Index: gcc/testsuite/g++.dg/lto/20080709_0.C
===================================================================
--- gcc/testsuite/g++.dg/lto/20080709_0.C	(revision 148817)
+++ gcc/testsuite/g++.dg/lto/20080709_0.C	(working copy)
@@ -1,4 +1,4 @@
-// { dg-do run }
+// { dg-lto-do run }
 
 class Init     {
 };
Index: gcc/testsuite/g++.dg/lto/20080829_0.C
===================================================================
--- gcc/testsuite/g++.dg/lto/20080829_0.C	(revision 148817)
+++ gcc/testsuite/g++.dg/lto/20080829_0.C	(working copy)
@@ -1,4 +1,4 @@
-// { dg-do compile }
+// { dg-lto-do assemble }
 
 /* The replacement of cos+sin with __builtin_cexpi done by
    pass_cse_sincos was using a builtin for which we had no attributes.



Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]