[Bug d/100967] d: ICE: Segmentation fault (../../gcc/d/dmd/declaration.c:1258)

cvs-commit at gcc dot gnu.org gcc-bugzilla@gcc.gnu.org
Thu Jun 10 18:28:18 GMT 2021


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

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

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

commit r9-9579-g3cf5b2930c22497617a535802b0c55248d688069
Author: Iain Buclaw <ibuclaw@gdcproject.org>
Date:   Thu Jun 10 19:59:23 2021 +0200

    d: Fix ICE in TypeInfoDeclaration, at dmd/declaration.c (PR100967)

    Generate a stub TypeInfo class even if the root Object class is missing.
    The front-end will take care of issuing an error and abort the
    compilation when running semantic on constructed TypeInfo objects.

    The errors issued by the code generation pass relating to missing or
    disabled RTTI has been consolidated into a single function, so that a
    meaningful error will be emitted before the front-end terminates.

    gcc/d/ChangeLog:

            PR d/100967
            * d-frontend.cc (getTypeInfoType): Move TypeInfo checks to
            check_typeinfo_type and call new function.
            * d-tree.h (check_typeinfo_type): Declare.
            * typeinfo.cc: Include dmd/scope.h.
            (create_frontend_tinfo_types): Generate front-end types even if
Object
            is missing.
            (build_typeinfo): Move TypeInfo checks to check_typeinfo_type and
call
            new function.
            (check_typeinfo_type): New function.

    gcc/testsuite/ChangeLog:

            PR d/100967
            * gdc.dg/pr100967.d: New test.

    (cherry picked from commit 5ae4a73057dd26e7f09b5ba5190b84b1bbea4368)


More information about the Gcc-bugs mailing list