[Bug middle-end/93519] [8/9 Regression] bogus -Wrestrict for strcpy(d, s) call guarded by d != s

cvs-commit at gcc dot gnu.org gcc-bugzilla@gcc.gnu.org
Fri Feb 7 11:58:00 GMT 2020


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

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

https://gcc.gnu.org/g:3c7a03bc360c3511fae3747a71e579e9fd0824f9

commit r10-6505-g3c7a03bc360c3511fae3747a71e579e9fd0824f9
Author: Richard Biener <rguenther@suse.de>
Date:   Fri Feb 7 12:56:18 2020 +0100

    middle-end/93519 - avoid folding stmts in obviously unreachable code

    The inliner folds stmts delayed, the following arranges things so
    to not fold stmts that are obviously not reachable to avoid warnings
    from those code regions.

    2020-02-07  Richard Biener  <rguenther@suse.de>

        PR middle-end/93519
        * tree-inline.c (fold_marked_statements): Do a PRE walk,
        skipping unreachable regions.
        (optimize_inline_calls): Skip folding stmts when we didn't
        inline.

        * gcc.dg/Wrestrict-21.c: New testcase.


More information about the Gcc-bugs mailing list