aboutsummaryrefslogtreecommitdiff
path: root/gcc
diff options
context:
space:
mode:
authorRichard Guenther <rguenther@suse.de>2010-09-17 09:04:14 +0000
committerRichard Biener <rguenth@gcc.gnu.org>2010-09-17 09:04:14 +0000
commitc3224d6f70eefb9ca469de8385bc565b1298dbb5 (patch)
tree56001a875850aaa9cf554d9e9cad94194fc9a518 /gcc
parentdbad82f59c66cf34d62a4d651736bb92b4b6a4f3 (diff)
downloadgcc-c3224d6f70eefb9ca469de8385bc565b1298dbb5.zip
gcc-c3224d6f70eefb9ca469de8385bc565b1298dbb5.tar.gz
gcc-c3224d6f70eefb9ca469de8385bc565b1298dbb5.tar.bz2
common.opt (combine): Remove.
2010-09-17 Richard Guenther <rguenther@suse.de> * common.opt (combine): Remove. * gcc.c (default_compilers): Remove specs testing combine. The C compilers no longer can combine. (option_map): Remove -combine. (display_help): Remove -combine. (driver_handle_option): Remove OPT_combine handling. (compile_input_file_p): Remove. (do_spec): Remove code concerning combine. (main): Likewise. * doc/invoke.texi: Remove traces of -combine. * lto-wrapper.c (run_gcc): Do not pass -combine to the compiler driver. lto/ * lang.opt (flag_wpa): Also enable for the driver. * gcc.dg/pr27898.c: Use -flto instead of -combine. * gcc.dg/pr28706.c: Likewise. * gcc.dg/pr28712.c: Likewise. * gcc.dg/pr30762-1.c: Likewise. * gcc.dg/pr30762-2.c: Likewise. * gcc.dg/pr31529-1.c: Likewise. * gcc.dg/pr31529-2.c: Likewise. * gcc.dg/pr34457-1.c: Likewise. * gcc.dg/pr34457-2.c: Likewise. * gcc.dg/pr34668-1.c: Likewise. * gcc.dg/pr34668-2.c: Likewise. * gcc.dg/pr34989-1.c: Likewise. * gcc.dg/pr34989-2.c: Likewise. * gcc.dg/pr43557-1.c: Likewise. * gcc.dg/pr43557-2.c: Likewise. * gcc.dg/debug/pr41893-1.c: Likewise. * gcc.dg/matrix/matrix.exp: Do not use -combine. * gcc.dg/matrix/matrix-3.c: Drop dg-options. * gcc.dg/matrix/matrix-4.c: Likewise. * gcc.dg/struct/struct-reorg.exp: Do not use -combine. * gcc.dg/struct/wo_prof_empty_str.c: Drop dg-options. * gcc.dg/struct/wo_prof_escape_arg_to_local.c: Likewise. * gcc.dg/struct/wo_prof_escape_return.c: Likewise. From-SVN: r164357
Diffstat (limited to 'gcc')
-rw-r--r--gcc/ChangeLog15
-rw-r--r--gcc/common.opt3
-rw-r--r--gcc/doc/invoke.texi23
-rw-r--r--gcc/gcc.c101
-rw-r--r--gcc/lto-wrapper.c6
-rw-r--r--gcc/lto/ChangeLog4
-rw-r--r--gcc/lto/lang.opt2
-rw-r--r--gcc/testsuite/ChangeLog26
-rw-r--r--gcc/testsuite/gcc.dg/debug/pr41893-1.c5
-rw-r--r--gcc/testsuite/gcc.dg/matrix/matrix-3.c2
-rw-r--r--gcc/testsuite/gcc.dg/matrix/matrix-4.c2
-rw-r--r--gcc/testsuite/gcc.dg/matrix/matrix.exp4
-rw-r--r--gcc/testsuite/gcc.dg/pr27898.c5
-rw-r--r--gcc/testsuite/gcc.dg/pr28706.c5
-rw-r--r--gcc/testsuite/gcc.dg/pr28712.c5
-rw-r--r--gcc/testsuite/gcc.dg/pr30762-1.c5
-rw-r--r--gcc/testsuite/gcc.dg/pr31529-1.c5
-rw-r--r--gcc/testsuite/gcc.dg/pr34457-1.c5
-rw-r--r--gcc/testsuite/gcc.dg/pr34668-1.c5
-rw-r--r--gcc/testsuite/gcc.dg/pr34989-1.c5
-rw-r--r--gcc/testsuite/gcc.dg/pr43557-1.c5
-rw-r--r--gcc/testsuite/gcc.dg/struct/struct-reorg.exp4
-rw-r--r--gcc/testsuite/gcc.dg/struct/wo_prof_empty_str.c2
-rw-r--r--gcc/testsuite/gcc.dg/struct/wo_prof_escape_arg_to_local.c2
-rw-r--r--gcc/testsuite/gcc.dg/struct/wo_prof_escape_return.c2
25 files changed, 99 insertions, 149 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog
index 04eeac7..50a1a03 100644
--- a/gcc/ChangeLog
+++ b/gcc/ChangeLog
@@ -1,5 +1,20 @@
2010-09-17 Richard Guenther <rguenther@suse.de>
+ * common.opt (combine): Remove.
+ * gcc.c (default_compilers): Remove specs testing combine.
+ The C compilers no longer can combine.
+ (option_map): Remove -combine.
+ (display_help): Remove -combine.
+ (driver_handle_option): Remove OPT_combine handling.
+ (compile_input_file_p): Remove.
+ (do_spec): Remove code concerning combine.
+ (main): Likewise.
+ * doc/invoke.texi: Remove traces of -combine.
+ * lto-wrapper.c (run_gcc): Do not pass -combine to the compiler
+ driver.
+
+2010-09-17 Richard Guenther <rguenther@suse.de>
+
PR middle-end/45678
* builtins.c (fold_builtin_memory_op): Always properly adjust
alignment of memory accesses.
diff --git a/gcc/common.opt b/gcc/common.opt
index e915ee3..3093ea5 100644
--- a/gcc/common.opt
+++ b/gcc/common.opt
@@ -309,9 +309,6 @@ Common Separate RejectDriver
auxbase-strip
Common Separate RejectDriver
-combine
-Driver Var(combine_flag)
-
c
Driver
diff --git a/gcc/doc/invoke.texi b/gcc/doc/invoke.texi
index 08d929a..4787a90 100644
--- a/gcc/doc/invoke.texi
+++ b/gcc/doc/invoke.texi
@@ -161,7 +161,7 @@ in the following sections.
@table @emph
@item Overall Options
@xref{Overall Options,,Options Controlling the Kind of Output}.
-@gccoptlist{-c -S -E -o @var{file} -combine -no-canonical-prefixes @gol
+@gccoptlist{-c -S -E -o @var{file} -no-canonical-prefixes @gol
-pipe -pass-exit-codes @gol
-x @var{language} -v -### --help@r{[}=@var{class}@r{[},@dots{}@r{]]} --target-help @gol
--version -wrapper@@@var{file} -fplugin=@var{file} -fplugin-arg-@var{name}=@var{arg} @gol
@@ -1195,23 +1195,6 @@ various stages of compilation. This fails to work on some systems where
the assembler is unable to read from a pipe; but the GNU assembler has
no trouble.
-@item -combine
-@opindex combine
-If you are compiling multiple source files, this option tells the driver
-to pass all the source files to the compiler at once (for those
-languages for which the compiler can handle this). This will allow
-intermodule analysis (IMA) to be performed by the compiler. Currently the only
-language for which this is supported is C@. If you pass source files for
-multiple languages to the driver, using this option, the driver will invoke
-the compiler(s) that support IMA once each, passing each compiler all the
-source files appropriate for it. For those languages that do not support
-IMA this option will be ignored, and the compiler will be invoked once for
-each source file in that language. If you use this option in conjunction
-with @option{-save-temps}, the compiler will generate multiple
-pre-processed files
-(one for each source file), but only one (combined) @file{.o} or
-@file{.s} file.
-
@item --help
@opindex help
Print (on the standard output) a description of the command line options
@@ -6757,7 +6740,7 @@ layout in order to better utilize spatial locality. This transformation is
affective for programs containing arrays of structures. Available in two
compilation modes: profile-based (enabled with @option{-fprofile-generate})
or static (which uses built-in heuristics). It works only in whole program
-mode, so it requires @option{-fwhole-program} and @option{-combine} to be
+mode, so it requires @option{-fwhole-program} to be
enabled. Structures considered @samp{cold} by this transformation are not
affected (see @option{--param struct-reorg-cold-struct-ratio=@var{value}}).
@@ -7462,7 +7445,7 @@ and those merged by attribute @code{externally_visible} become static functions
and in effect are optimized more aggressively by interprocedural optimizers. If @command{gold} is used as the linker plugin, @code{externally_visible} attributes are automatically added to functions (not variable yet due to a current @command{gold} issue) that are accessed outside of LTO objects according to resolution file produced by @command{gold}. For other linkers that cannot generate resolution file, explicit @code{externally_visible} attributes are still necessary.
While this option is equivalent to proper use of the @code{static} keyword for
programs consisting of a single file, in combination with option
-@option{-combine}, @option{-flto} or @option{-fwhopr} this flag can be used to
+@option{-flto} or @option{-fwhopr} this flag can be used to
compile many smaller scale programs since the functions and variables become
local for the whole combined compilation unit, not for the single source file
itself.
diff --git a/gcc/gcc.c b/gcc/gcc.c
index 479d7da..b459a92 100644
--- a/gcc/gcc.c
+++ b/gcc/gcc.c
@@ -959,7 +959,7 @@ static const struct compiler default_compilers[] =
{".java", "#Java", 0, 0, 0}, {".class", "#Java", 0, 0, 0},
{".zip", "#Java", 0, 0, 0}, {".jar", "#Java", 0, 0, 0},
/* Next come the entries for C. */
- {".c", "@c", 0, 1, 1},
+ {".c", "@c", 0, 0, 1},
{"@c",
/* cc1 has an integrated ISO C preprocessor. We should invoke the
external preprocessor if -save-temps is given. */
@@ -967,20 +967,13 @@ static const struct compiler default_compilers[] =
%{!E:%{!M:%{!MM:\
%{traditional|ftraditional:\
%eGNU C no longer supports -traditional without -E}\
- %{!combine:\
- %{save-temps*|traditional-cpp|no-integrated-cpp:%(trad_capable_cpp) \
- %(cpp_options) -o %{save-temps*:%b.i} %{!save-temps*:%g.i} \n\
- cc1 -fpreprocessed %{save-temps*:%b.i} %{!save-temps*:%g.i} \
- %(cc1_options)}\
- %{!save-temps*:%{!traditional-cpp:%{!no-integrated-cpp:\
- cc1 %(cpp_unique_options) %(cc1_options)}}}\
- %{!fsyntax-only:%(invoke_as)}} \
- %{combine:\
- %{save-temps*|traditional-cpp|no-integrated-cpp:%(trad_capable_cpp) \
- %(cpp_options) -o %{save-temps*:%b.i} %{!save-temps*:%g.i}}\
- %{!save-temps*:%{!traditional-cpp:%{!no-integrated-cpp:\
- cc1 %(cpp_unique_options) %(cc1_options)}}\
- %{!fsyntax-only:%(invoke_as)}}}}}}", 0, 1, 1},
+ %{save-temps*|traditional-cpp|no-integrated-cpp:%(trad_capable_cpp) \
+ %(cpp_options) -o %{save-temps*:%b.i} %{!save-temps*:%g.i} \n\
+ cc1 -fpreprocessed %{save-temps*:%b.i} %{!save-temps*:%g.i} \
+ %(cc1_options)}\
+ %{!save-temps*:%{!traditional-cpp:%{!no-integrated-cpp:\
+ cc1 %(cpp_unique_options) %(cc1_options)}}}\
+ %{!fsyntax-only:%(invoke_as)}}}}", 0, 0, 1},
{"-",
"%{!E:%e-E or -x required when input is from standard input}\
%(trad_capable_cpp) %(cpp_options) %(cpp_debug_options)", 0, 0, 0},
@@ -1000,7 +993,7 @@ static const struct compiler default_compilers[] =
cc1 %(cpp_unique_options) %(cc1_options)\
%{!fdump-ada-spec*:-o %g.s %{!o*:--output-pch=%i.gch}\
%W{o*:--output-pch=%*}}%V}}}}}}", 0, 0, 0},
- {".i", "@cpp-output", 0, 1, 0},
+ {".i", "@cpp-output", 0, 0, 0},
{"@cpp-output",
"%{!M:%{!MM:%{!E:cc1 -fpreprocessed %i %(cc1_options) %{!fsyntax-only:%(invoke_as)}}}}", 0, 1, 0},
{".s", "@assembler", 0, 1, 0},
@@ -1078,7 +1071,6 @@ static const struct option_map option_map[] =
{"--classpath", "-fclasspath=", "aj"},
{"--bootclasspath", "-fbootclasspath=", "aj"},
{"--CLASSPATH", "-fclasspath=", "aj"},
- {"--combine", "-combine", 0},
{"--comments", "-C", 0},
{"--comments-in-macros", "-CC", 0},
{"--compile", "-c", 0},
@@ -3322,7 +3314,6 @@ display_help (void)
fputs (_(" -Xassembler <arg> Pass <arg> on to the assembler\n"), stdout);
fputs (_(" -Xpreprocessor <arg> Pass <arg> on to the preprocessor\n"), stdout);
fputs (_(" -Xlinker <arg> Pass <arg> on to the linker\n"), stdout);
- fputs (_(" -combine Pass multiple source files to compiler at once\n"), stdout);
fputs (_(" -save-temps Do not delete intermediate files\n"), stdout);
fputs (_(" -save-temps=<arg> Do not delete intermediate files\n"), stdout);
fputs (_("\
@@ -3761,8 +3752,6 @@ driver_handle_option (const struct cl_decoded_option *decoded,
case OPT_pipe:
validated = true;
- /* Fall through. */
- case OPT_combine:
/* These options set the variables specified in common.opt
automatically, but do need to be saved for spec
processing. */
@@ -7003,10 +6992,7 @@ warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.\n\n"
explicit_link_files = XCNEWVEC (char, n_infiles);
- if (combine_flag)
- combine_inputs = true;
- else
- combine_inputs = false;
+ combine_inputs = have_o || flag_wpa;
for (i = 0; (int) i < n_infiles; i++)
{
@@ -7039,63 +7025,7 @@ warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.\n\n"
}
if (!combine_inputs && have_c && have_o && lang_n_infiles > 1)
- fatal_error ("cannot specify -o with -c, -S or -E with multiple files");
-
- if (combine_flag && save_temps_flag)
- {
- bool save_combine_inputs = combine_inputs;
- /* Must do a separate pre-processing pass for C & Objective-C files, to
- obtain individual .i files. */
-
- combine_inputs = false;
- for (i = 0; (int) i < n_infiles; i++)
- {
- int this_file_error = 0;
-
- input_file_number = i;
- set_input (infiles[i].name);
- if (infiles[i].incompiler
- && (infiles[i].incompiler)->needs_preprocessing)
- input_file_compiler = infiles[i].incompiler;
- else
- continue;
-
- if (input_file_compiler)
- {
- if (input_file_compiler->spec[0] == '#')
- {
- error ("%s: %s compiler not installed on this system",
- gcc_input_filename, &input_file_compiler->spec[1]);
- this_file_error = 1;
- }
- else
- {
- value = do_spec (input_file_compiler->spec);
- infiles[i].preprocessed = true;
- if (!have_o_argbuf_index)
- fatal_error ("spec %qs is invalid",
- input_file_compiler->spec);
- infiles[i].name = argbuf[have_o_argbuf_index];
- infiles[i].incompiler
- = lookup_compiler (infiles[i].name,
- strlen (infiles[i].name),
- infiles[i].language);
-
- if (value < 0)
- this_file_error = 1;
- }
- }
-
- if (this_file_error)
- {
- delete_failure_queue ();
- errorcount++;
- break;
- }
- clear_failure_queue ();
- }
- combine_inputs = save_combine_inputs;
- }
+ fatal_error ("cannot specify -o with -c, -S or -E with multiple files");
for (i = 0; (int) i < n_infiles; i++)
{
@@ -7115,12 +7045,9 @@ warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.\n\n"
/* Figure out which compiler from the file's suffix. */
- if (! combine_inputs)
- input_file_compiler
- = lookup_compiler (infiles[i].name, input_filename_length,
- infiles[i].language);
- else
- input_file_compiler = infiles[i].incompiler;
+ input_file_compiler
+ = lookup_compiler (infiles[i].name, input_filename_length,
+ infiles[i].language);
if (input_file_compiler)
{
diff --git a/gcc/lto-wrapper.c b/gcc/lto-wrapper.c
index 0ef8b87..5401017 100644
--- a/gcc/lto-wrapper.c
+++ b/gcc/lto-wrapper.c
@@ -423,7 +423,6 @@ run_gcc (unsigned argc, char *argv[])
argv_ptr[0] = linker_output;
argv_ptr[1] = "-o";
argv_ptr[2] = flto_out;
- argv_ptr[3] = "-combine";
}
else if (lto_mode == LTO_MODE_WHOPR)
{
@@ -459,15 +458,14 @@ run_gcc (unsigned argc, char *argv[])
strcpy (tmp, ltrans_output_file);
argv_ptr[2] = "-fwpa";
- argv_ptr[3] = "-combine";
}
else
fatal ("invalid LTO mode");
/* Append the input objects and possible preceeding arguments. */
for (i = 1; i < argc; ++i)
- argv_ptr[3 + i] = argv[i];
- argv_ptr[3 + i] = NULL;
+ argv_ptr[2 + i] = argv[i];
+ argv_ptr[2 + i] = NULL;
fork_execute (CONST_CAST (char **, new_argv));
diff --git a/gcc/lto/ChangeLog b/gcc/lto/ChangeLog
index a8f7bc1..3b229bc 100644
--- a/gcc/lto/ChangeLog
+++ b/gcc/lto/ChangeLog
@@ -1,3 +1,7 @@
+2010-09-17 Richard Guenther <rguenther@suse.de>
+
+ * lang.opt (flag_wpa): Also enable for the driver.
+
2010-09-16 Jan Hubicka <jh@suse.cz>
* lto.c (lto_materialize_function): Do not tamper with STATIC and
diff --git a/gcc/lto/lang.opt b/gcc/lto/lang.opt
index 53ab8e8..199adea 100644
--- a/gcc/lto/lang.opt
+++ b/gcc/lto/lang.opt
@@ -33,7 +33,7 @@ LTO Joined Var(ltrans_output_list)
Specify a file to which a list of files output by LTRANS is written.
fwpa
-LTO Report Var(flag_wpa) Optimization
+LTO Driver Report Var(flag_wpa) Optimization
Run the link-time optimizer in whole program analysis (WPA) mode.
fresolution=
diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog
index 96955e0..b4bfbe4 100644
--- a/gcc/testsuite/ChangeLog
+++ b/gcc/testsuite/ChangeLog
@@ -1,3 +1,29 @@
+2010-09-17 Richard Guenther <rguenther@suse.de>
+
+ * gcc.dg/pr27898.c: Use -flto instead of -combine.
+ * gcc.dg/pr28706.c: Likewise.
+ * gcc.dg/pr28712.c: Likewise.
+ * gcc.dg/pr30762-1.c: Likewise.
+ * gcc.dg/pr30762-2.c: Likewise.
+ * gcc.dg/pr31529-1.c: Likewise.
+ * gcc.dg/pr31529-2.c: Likewise.
+ * gcc.dg/pr34457-1.c: Likewise.
+ * gcc.dg/pr34457-2.c: Likewise.
+ * gcc.dg/pr34668-1.c: Likewise.
+ * gcc.dg/pr34668-2.c: Likewise.
+ * gcc.dg/pr34989-1.c: Likewise.
+ * gcc.dg/pr34989-2.c: Likewise.
+ * gcc.dg/pr43557-1.c: Likewise.
+ * gcc.dg/pr43557-2.c: Likewise.
+ * gcc.dg/debug/pr41893-1.c: Likewise.
+ * gcc.dg/matrix/matrix.exp: Do not use -combine.
+ * gcc.dg/matrix/matrix-3.c: Drop dg-options.
+ * gcc.dg/matrix/matrix-4.c: Likewise.
+ * gcc.dg/struct/struct-reorg.exp: Do not use -combine.
+ * gcc.dg/struct/wo_prof_empty_str.c: Drop dg-options.
+ * gcc.dg/struct/wo_prof_escape_arg_to_local.c: Likewise.
+ * gcc.dg/struct/wo_prof_escape_return.c: Likewise.
+
2010-09-16 Tobias Burnus <burnus@net-b.de>
PR fortran/43665
diff --git a/gcc/testsuite/gcc.dg/debug/pr41893-1.c b/gcc/testsuite/gcc.dg/debug/pr41893-1.c
index 54a31fb..fbd7445 100644
--- a/gcc/testsuite/gcc.dg/debug/pr41893-1.c
+++ b/gcc/testsuite/gcc.dg/debug/pr41893-1.c
@@ -1,6 +1,7 @@
/* PR debug/41893 */
-/* { dg-do compile } */
-/* { dg-options "-combine -fwhole-program -O" } */
+/* { dg-do link } */
+/* { dg-require-effective-target-lto } */
+/* { dg-options "-flto -fwhole-program -O -r -nostdlib" } */
/* { dg-additional-sources "pr41893-2.c" } */
struct S { int v; };
diff --git a/gcc/testsuite/gcc.dg/matrix/matrix-3.c b/gcc/testsuite/gcc.dg/matrix/matrix-3.c
index 5990abf..28a5a16 100644
--- a/gcc/testsuite/gcc.dg/matrix/matrix-3.c
+++ b/gcc/testsuite/gcc.dg/matrix/matrix-3.c
@@ -1,6 +1,4 @@
/* { dg-do compile } */
-/* { dg-options "-O3 -fipa-matrix-reorg -fdump-ipa-matrix-reorg -c -fwhole-program -combine" } */
-
#include <stdio.h>
#include <stdlib.h>
diff --git a/gcc/testsuite/gcc.dg/matrix/matrix-4.c b/gcc/testsuite/gcc.dg/matrix/matrix-4.c
index 7ca79ec..d741b46 100644
--- a/gcc/testsuite/gcc.dg/matrix/matrix-4.c
+++ b/gcc/testsuite/gcc.dg/matrix/matrix-4.c
@@ -1,6 +1,4 @@
/* { dg-do compile } */
-/* { dg-options "-O3 -fipa-matrix-reorg -fdump-ipa-matrix-reorg -c -fwhole-program -combine" } */
-
#include <stdio.h>
#include <stdlib.h>
diff --git a/gcc/testsuite/gcc.dg/matrix/matrix.exp b/gcc/testsuite/gcc.dg/matrix/matrix.exp
index b2f4ede..fc1eb41 100644
--- a/gcc/testsuite/gcc.dg/matrix/matrix.exp
+++ b/gcc/testsuite/gcc.dg/matrix/matrix.exp
@@ -19,7 +19,7 @@
load_lib gcc-dg.exp
load_lib target-supports.exp
-set DEFAULT_MATCFLAGS "-O3 -fipa-matrix-reorg -fdump-ipa-matrix-reorg -fwhole-program -combine"
+set DEFAULT_MATCFLAGS "-O3 -fipa-matrix-reorg -fdump-ipa-matrix-reorg -fwhole-program"
# Initialize `dg'.
dg-init
@@ -52,7 +52,7 @@ load_lib profopt.exp
# needed to generate profile data, the second is options to use the
# profile data.
set profile_option "-fprofile-generate -O3"
-set feedback_option "-fprofile-use -fipa-matrix-reorg -fdump-ipa-matrix-reorg -O3 -fwhole-program -combine"
+set feedback_option "-fprofile-use -fipa-matrix-reorg -fdump-ipa-matrix-reorg -O3 -fwhole-program"
foreach src [lsort [glob -nocomplain $srcdir/$subdir/transpose-*.c]] {
# If we're only testing specific files and this isn't one of them, skip it.
diff --git a/gcc/testsuite/gcc.dg/pr27898.c b/gcc/testsuite/gcc.dg/pr27898.c
index bb7cce1..e4160ca 100644
--- a/gcc/testsuite/gcc.dg/pr27898.c
+++ b/gcc/testsuite/gcc.dg/pr27898.c
@@ -1,6 +1,7 @@
/* PR c/27898 */
-/* { dg-do compile } */
-/* { dg-options "--combine" } */
+/* { dg-do link } */
+/* { dg-require-effective-target-lto } */
+/* { dg-options "-flto -r -nostdlib" } */
/* { dg-additional-sources "pr27898.c" } */
union u { struct { int i; }; };
diff --git a/gcc/testsuite/gcc.dg/pr28706.c b/gcc/testsuite/gcc.dg/pr28706.c
index 4c185af..9d6f1eb 100644
--- a/gcc/testsuite/gcc.dg/pr28706.c
+++ b/gcc/testsuite/gcc.dg/pr28706.c
@@ -1,6 +1,7 @@
/* PR c/28706 */
-/* { dg-do compile } */
-/* { dg-options "--combine" } */
+/* { dg-do link } */
+/* { dg-require-effective-target-lto } */
+/* { dg-options "-flto -r -nostdlib" } */
/* { dg-additional-sources "pr28706.c" } */
struct A
diff --git a/gcc/testsuite/gcc.dg/pr28712.c b/gcc/testsuite/gcc.dg/pr28712.c
index 0bbb453..1578577 100644
--- a/gcc/testsuite/gcc.dg/pr28712.c
+++ b/gcc/testsuite/gcc.dg/pr28712.c
@@ -1,6 +1,7 @@
/* PR c/28712 */
-/* { dg-do compile } */
-/* { dg-options "--combine" } */
+/* { dg-do link } */
+/* { dg-require-effective-target-lto } */
+/* { dg-options "-flto -r -nostdlib" } */
/* { dg-additional-sources "pr28712.c pr28712.c" } */
struct A;
diff --git a/gcc/testsuite/gcc.dg/pr30762-1.c b/gcc/testsuite/gcc.dg/pr30762-1.c
index 97dca8c..df93d73 100644
--- a/gcc/testsuite/gcc.dg/pr30762-1.c
+++ b/gcc/testsuite/gcc.dg/pr30762-1.c
@@ -1,6 +1,7 @@
/* PR c/30762 */
-/* { dg-do compile } */
-/* { dg-options "--combine -O3" } */
+/* { dg-do link } */
+/* { dg-require-effective-target-lto } */
+/* { dg-options "-flto -r -nostdlib -O3" } */
/* { dg-additional-sources pr30762-2.c } */
typedef struct { int i; } D;
diff --git a/gcc/testsuite/gcc.dg/pr31529-1.c b/gcc/testsuite/gcc.dg/pr31529-1.c
index 20703ed..4585b64 100644
--- a/gcc/testsuite/gcc.dg/pr31529-1.c
+++ b/gcc/testsuite/gcc.dg/pr31529-1.c
@@ -1,5 +1,6 @@
-/* { dg-do compile } */
-/* { dg-options "-combine" } */
+/* { dg-do link } */
+/* { dg-require-effective-target-lto } */
+/* { dg-options "-flto -r -nostdlib" } */
/* { dg-additional-sources "pr31529-2.c" } */
getline ()
diff --git a/gcc/testsuite/gcc.dg/pr34457-1.c b/gcc/testsuite/gcc.dg/pr34457-1.c
index ccd937c..1b4c316 100644
--- a/gcc/testsuite/gcc.dg/pr34457-1.c
+++ b/gcc/testsuite/gcc.dg/pr34457-1.c
@@ -1,7 +1,8 @@
/* PR c/34457 */
-/* { dg-do compile } */
+/* { dg-do link } */
/* { dg-require-effective-target trampolines } */
-/* { dg-options "--combine -O2" } */
+/* { dg-require-effective-target-lto } */
+/* { dg-options "-flto -r -nostdlib -O2" } */
/* { dg-additional-sources "pr34457-2.c" } */
diff --git a/gcc/testsuite/gcc.dg/pr34668-1.c b/gcc/testsuite/gcc.dg/pr34668-1.c
index 5763bb6..11c6691 100644
--- a/gcc/testsuite/gcc.dg/pr34668-1.c
+++ b/gcc/testsuite/gcc.dg/pr34668-1.c
@@ -1,6 +1,7 @@
/* PR c/34668 */
-/* { dg-do compile } */
-/* { dg-options "--combine -O2" } */
+/* { dg-do link } */
+/* { dg-require-effective-target-lto } */
+/* { dg-options "-flto -r -nostdlib -O2" } */
/* { dg-additional-sources "pr34668-2.c" } */
struct optab { unsigned code; };
diff --git a/gcc/testsuite/gcc.dg/pr34989-1.c b/gcc/testsuite/gcc.dg/pr34989-1.c
index 88e8d64..cd45c83 100644
--- a/gcc/testsuite/gcc.dg/pr34989-1.c
+++ b/gcc/testsuite/gcc.dg/pr34989-1.c
@@ -1,5 +1,6 @@
-/* { dg-do compile } */
-/* { dg-options "--combine -O2" } */
+/* { dg-do link } */
+/* { dg-require-effective-target-lto } */
+/* { dg-options "-flto -r -nostdlib -O2" } */
/* { dg-additional-sources "pr34989-2.c" } */
extern struct globals *const ptr_to_globals;
diff --git a/gcc/testsuite/gcc.dg/pr43557-1.c b/gcc/testsuite/gcc.dg/pr43557-1.c
index 8c7d0b4..466e89a 100644
--- a/gcc/testsuite/gcc.dg/pr43557-1.c
+++ b/gcc/testsuite/gcc.dg/pr43557-1.c
@@ -1,6 +1,7 @@
/* PR debug/43557 */
-/* { dg-do compile } */
-/* { dg-options "--combine -g -O2" } */
+/* { dg-do link } */
+/* { dg-require-effective-target-lto } */
+/* { dg-options "-flto -r -nostdlib -g -O2" } */
/* { dg-additional-sources "pr43557-2.c" } */
struct S
diff --git a/gcc/testsuite/gcc.dg/struct/struct-reorg.exp b/gcc/testsuite/gcc.dg/struct/struct-reorg.exp
index c96501c..34ec94e 100644
--- a/gcc/testsuite/gcc.dg/struct/struct-reorg.exp
+++ b/gcc/testsuite/gcc.dg/struct/struct-reorg.exp
@@ -20,7 +20,7 @@
load_lib gcc-dg.exp
load_lib target-supports.exp
-set STRUCT_REORG_CFLAGS "-O3 -fipa-struct-reorg -fdump-ipa-all -fwhole-program -combine"
+set STRUCT_REORG_CFLAGS "-O3 -fipa-struct-reorg -fdump-ipa-all -fwhole-program"
# Initialize `dg'.
dg-init
@@ -51,7 +51,7 @@ load_lib profopt.exp
# These are globals used by profopt-execute. The first is options
# needed to generate profile data, the second is options to use the
# profile data.
-set common "-O3 -fwhole-program -combine"
+set common "-O3 -fwhole-program"
set profile_option [concat $common " -fprofile-generate"]
set feedback_option [concat $common " -fprofile-use -fipa-struct-reorg -fdump-ipa-all"]
diff --git a/gcc/testsuite/gcc.dg/struct/wo_prof_empty_str.c b/gcc/testsuite/gcc.dg/struct/wo_prof_empty_str.c
index 5841120..09668fa 100644
--- a/gcc/testsuite/gcc.dg/struct/wo_prof_empty_str.c
+++ b/gcc/testsuite/gcc.dg/struct/wo_prof_empty_str.c
@@ -1,5 +1,3 @@
-/* { dg-options "-O3 -fno-inline -fdump-ipa-all -fipa-struct-reorg -fwhole-program -combine" } */
-/* { dg-do compile } */
/* { dg-do run } */
#include <stdlib.h>
diff --git a/gcc/testsuite/gcc.dg/struct/wo_prof_escape_arg_to_local.c b/gcc/testsuite/gcc.dg/struct/wo_prof_escape_arg_to_local.c
index 781a847..0116d81 100644
--- a/gcc/testsuite/gcc.dg/struct/wo_prof_escape_arg_to_local.c
+++ b/gcc/testsuite/gcc.dg/struct/wo_prof_escape_arg_to_local.c
@@ -1,5 +1,3 @@
-/* { dg-options "-O3 -fno-inline -fno-ipa-sra -fdump-ipa-all -fipa-struct-reorg -fwhole-program -combine" } */
-/* { dg-do compile } */
/* { dg-do run } */
#include <stdlib.h>
diff --git a/gcc/testsuite/gcc.dg/struct/wo_prof_escape_return.c b/gcc/testsuite/gcc.dg/struct/wo_prof_escape_return.c
index 8892fa9..21a6a7f3 100644
--- a/gcc/testsuite/gcc.dg/struct/wo_prof_escape_return.c
+++ b/gcc/testsuite/gcc.dg/struct/wo_prof_escape_return.c
@@ -1,5 +1,3 @@
-/* { dg-options "-O3 -fno-inline -fdump-ipa-all -fipa-struct-reorg -fwhole-program -combine" } */
-/* { dg-do compile } */
/* { dg-do run } */
#include <stdlib.h>