[Bug driver/96230] driver: ICE in process_command, at gcc.c:5095

cvs-commit at gcc dot gnu.org gcc-bugzilla@gcc.gnu.org
Fri Jul 24 19:16:16 GMT 2020


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

--- Comment #3 from CVS Commits <cvs-commit at gcc dot gnu.org> ---
The master branch has been updated by Alexandre Oliva <aoliva@gcc.gnu.org>:

https://gcc.gnu.org/g:c1b9cb1a83b0d6485d9922ecef097d250a22d830

commit r11-2312-gc1b9cb1a83b0d6485d9922ecef097d250a22d830
Author: Alexandre Oliva <oliva@adacore.com>
Date:   Fri Jul 24 15:38:38 2020 -0300

    [PR96230] some -dumpbase-ext fixes

    The initial bug report was that compiling (-c) with -dumpbase ""
    -dumpbase-ext .<ext> crashes the driver.

    The verification of -dumpbase-ext against -dumpbase doesn't cover the
    case in which -dumpbase activates backward-compatibility mode.

    I added a test for that, and for -dumpbase-ext without -dumpbase,
    trying to make it work in a sensible way, as if applied to the default
    -dumpbase for each file.  It turned out that this made for too much
    complexity in dealing with suffixes derived from input filenames, so I
    gave that up and returned to discarding -dumpbase-ext as documented,
    ending up with a change identical to that in the original bug report.

    I also thought I caught an off-by-one error in the initial
    verification, that caused dumpbase_ext to be discarded if it was
    identical to the specified dumpbase, but that turned out to be
    intentional as well, so I put in comments and a test to reflect it.

    Finally, an earlier version of the newly-added tests used "$var.ext"
    in an expected output list, which showed me the handling of string
    expansion was incorrect.  Reworked the expr into an eval to make that
    work, and, absent any reliance on post-eval adjustments to so-expanded
    output names, I arranged for the adjustments to be skipped after eval.


    Co-Authored-By: "Zhanghaijian (A)" <z.zhanghaijian@huawei.com>
    for  gcc/ChangeLog

            PR driver/96230
            * gcc.c (process_command): Adjust and document conditions to
            reset dumpbase_ext.

    for  gcc/testsuite/ChangeLog

            PR driver/96230
            * gcc.misc-tests/outputs.exp: Add tests with -dumpbase-ext,
            with identical -dumpbase, with -dumpbase "", and without any
            -dumpbase.
            (outest): Fix "" expansion in expected outputs, skip
            adjustments.


More information about the Gcc-bugs mailing list