public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
From: "marxin at gcc dot gnu.org" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug lto/98275] -flto=auto fails if nthreads_var is zero, must not pass -j0
Date: Mon, 14 Dec 2020 16:15:25 +0000	[thread overview]
Message-ID: <bug-98275-4-deWN4qi6Ni@http.gcc.gnu.org/bugzilla/> (raw)
In-Reply-To: <bug-98275-4@http.gcc.gnu.org/bugzilla/>

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=98275

Martin Liška <marxin at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
   Target Milestone|---                         |11.0
             Status|UNCONFIRMED                 |ASSIGNED
   Last reconfirmed|                            |2020-12-14
     Ever confirmed|0                           |1
           Assignee|unassigned at gcc dot gnu.org      |marxin at gcc dot gnu.org

--- Comment #1 from Martin Liška <marxin at gcc dot gnu.org> ---
Thank you for the bug report.

Can you please test the following patch:

diff --git a/gcc/lto-wrapper.c b/gcc/lto-wrapper.c
index 68ccb156521..da1305c1696 100644
--- a/gcc/lto-wrapper.c
+++ b/gcc/lto-wrapper.c
@@ -1780,6 +1780,8 @@ cont1:
        {
          char buf[256];
          init_num_threads ();
+         if (nthreads_var == 0)
+           nthreads_var = 1;
          if (verbose)
            fprintf (stderr, "LTO parallelism level set to %ld\n",
                     nthreads_var);

  reply	other threads:[~2020-12-14 16:15 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-12-14 13:55 [Bug lto/98275] New: " pexu@gcc-bugzilla.mail.kapsi.fi
2020-12-14 16:15 ` marxin at gcc dot gnu.org [this message]
2020-12-15  9:07 ` [Bug lto/98275] " cvs-commit at gcc dot gnu.org
2020-12-15  9:10 ` marxin at gcc dot gnu.org
2020-12-15 10:12 ` pexu@gcc-bugzilla.mail.kapsi.fi

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=bug-98275-4-deWN4qi6Ni@http.gcc.gnu.org/bugzilla/ \
    --to=gcc-bugzilla@gcc.gnu.org \
    --cc=gcc-bugs@gcc.gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).