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

--- Comment #4 from CVS Commits <cvs-commit at gcc dot gnu.org> ---
The master branch has been updated by Martin Liska <mar...@gcc.gnu.org>:

https://gcc.gnu.org/g:9a92e46c0e9a75cd14125493b8826d3e33dd0f67

commit r12-7002-g9a92e46c0e9a75cd14125493b8826d3e33dd0f67
Author: Martin Liska <mli...@suse.cz>
Date:   Wed Feb 2 14:21:51 2022 +0100

    lto: fix error handling for -Wl,-plugin-opt=debug

    When one uses something like: -Wl,-plugin-opt=debug,
    we end up with lto1 WPA invocation that has 'debug'
    on command line. We interpret that as input filename.

    The patch moves resolution checking later so that we end up with
    a reasonable error message:

    lto1: fatal error: open debug failed: No such file or directory
    compilation terminated.

            PR lto/104333

    gcc/lto/ChangeLog:

            * lto-common.cc (read_cgraph_and_symbols): Move resolution
            checking for number of files later and report a reasonable
            error message.
            * lto-object.cc (lto_obj_file_open): Make error fatal.

Reply via email to