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

--- Comment #21 from GCC Commits <cvs-commit at gcc dot gnu.org> ---
The master branch has been updated by Jakub Jelinek <[email protected]>:

https://gcc.gnu.org/g:7da47d53d716b689784eaad20ebe26fdbb33982a

commit r17-2157-g7da47d53d716b689784eaad20ebe26fdbb33982a
Author: Jakub Jelinek <[email protected]>
Date:   Sun Jul 5 16:47:47 2026 +0200

    testsuite: Add C++ testcase for the recent PTA bug

    On Wed, Jul 01, 2026 at 09:47:46AM +0200, Eric Botcazou wrote:
    > this is a regression present on mainline, 16, 15 and 14 branches
introduced by
    > the fix for PR tree-optimization/112653 (PTA and return).  What happens
is
    > that DSE incorrectly eliminates a call to __builtin_memcpy, whose
destination
    > is obtained from (an equivalent of) malloc and is ultimately returned
from the
    > function.  But this happens only when the dynamic allocation is
conditional.

    For us Ada illiterate, here is a C++ testcase which got fixed by this too.

    2026-07-05  Jakub Jelinek  <[email protected]>

            * g++.dg/opt/20260703-1.C: New test.

    Reviewed-by: Richard Biener <[email protected]>

Reply via email to