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

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

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

commit r13-3072-gce3a1b5976079b1467473b4628f05797fd2eae08
Author: Jason Merrill <ja...@redhat.com>
Date:   Tue Oct 4 17:06:04 2022 -0400

    c++: fix debug info for array temporary [PR107154]

    In the testcase the elaboration of the array init that happens at
genericize
    time was getting the location info for the end of the function; fixed by
    doing the expansion at the location of the original expression.

            PR c++/107154

    gcc/cp/ChangeLog:

            * cp-gimplify.cc (cp_genericize_init_expr): Use iloc_sentinel.
            (cp_genericize_target_expr): Likewise.

    gcc/testsuite/ChangeLog:

            * g++.dg/debug/dwarf2/lineno-array1.C: New test.

Reply via email to