This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [PATCH] Remove -combine support
On Thu, 16 Sep 2010, Joseph S. Myers wrote:
> On Thu, 16 Sep 2010, Richard Guenther wrote:
>
> > ! combine_inputs = have_o || flag_wpa;
>
> So combine_inputs will be true whenever flag_o is true.
>
> > if (!combine_inputs && have_c && have_o && lang_n_infiles > 1)
> > ! fatal_error ("cannot specify -o with -c, -S or -E with multiple files");
>
> So won't this conditional always be false: if have_o is true then
> combine_inputs is true and !combine_inputs is false? When will this error
> be given?
When the loop over inputs sees a compiler that cannot combine
(like after the patch cc1). Then combine_inputs will be adjusted to
false:
combine_inputs = have_o || flag_wpa;
for (i = 0; (int) i < n_infiles; i++)
{
const char *name = infiles[i].name;
struct compiler *compiler = lookup_compiler (name,
strlen (name),
infiles[i].language);
if (compiler && !(compiler->combinable))
combine_inputs = false;
Another possibility would have been to introduce another flag
to be used by LTO for the -flto optimization stage (for -fwhopr
we have -fwpa we can use and ltrans stage works on a single
object only). Would you prefer that?
> Once the -combine removal is in, there are quite a few bugs matching
> keywords such as "-combine", "IMA" or "intermodule" to close as WONTFIX.
Ah, indeed.
Richard.