[Bug middle-end/101734] missing warning reading from a write-only object

cvs-commit at gcc dot gnu.org gcc-bugzilla@gcc.gnu.org
Fri Aug 13 18:24:58 GMT 2021


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

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

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

commit r12-2903-gfb85d6eb6c392e829d1ee5b8a2e2b81c53c9840f
Author: Martin Sebor <msebor@redhat.com>
Date:   Fri Aug 13 12:21:20 2021 -0600

    Warn for reads from write-only arguments [PR101734].

    Resolves:
    PR middle-end/101734 - missing warning reading from a write-only object

    gcc/ChangeLog:

            PR middle-end/101734
            * tree-ssa-uninit.c (maybe_warn_read_write_only): New function.
            (maybe_warn_operand): Call it.

    gcc/testsuite/ChangeLog:

            PR middle-end/101734
            * gcc.dg/uninit-42.c: New test.


More information about the Gcc-bugs mailing list