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

--- Comment #2 from CVS Commits <cvs-commit at gcc dot gnu.org> ---
The releases/gcc-10 branch has been updated by Iain Buclaw
<ibuc...@gcc.gnu.org>:

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

commit r10-8647-ga5d07caca15958980ae9cc4570a784f8b1a43403
Author: Iain Buclaw <ibuc...@gdcproject.org>
Date:   Tue Jul 21 19:59:00 2020 +0200

    d: Fix ICE using non-local variable: internal compiler error: Segmentation
fault

    Moves no frame access error to own function, adding use of it for both
    when get_framedecl() cannot find a path to the outer function frame, and
    guarding get_decl_tree() from recursively calling itself.

    gcc/d/ChangeLog:

            PR d/96254
            * d-codegen.cc (error_no_frame_access): New.
            (get_frame_for_symbol): Use fdparent name in error message.
            (get_framedecl): Replace call to assert with error.
            * d-tree.h (error_no_frame_access): Declare.
            * decl.cc (get_decl_tree): Detect recursion and error.

    gcc/testsuite/ChangeLog:

            PR d/96254
            * gdc.dg/pr96254a.d: New test.
            * gdc.dg/pr96254b.d: New test.

    (cherry picked from commit 2b1c2a4bd9fb555dccde5d67d6da64547064e0e6)

Reply via email to