[Bug middle-end/89091] ICE: Segmentation fault (in tree_class_check)

jakub at gcc dot gnu.org gcc-bugzilla@gcc.gnu.org
Tue Apr 30 20:30:00 GMT 2019


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

--- Comment #12 from Jakub Jelinek <jakub at gcc dot gnu.org> ---
Author: jakub
Date: Tue Apr 30 20:29:44 2019
New Revision: 270713

URL: https://gcc.gnu.org/viewcvs?rev=270713&root=gcc&view=rev
Log:
        Backported from mainline
        2019-02-20  Jakub Jelinek  <jakub@redhat.com>
                    David Malcolm  <dmalcolm@redhat.com>

        PR middle-end/89091
        * fold-const.c (decode_field_reference): Return NULL_TREE if
        lang_hooks.types.type_for_size returns NULL.  Check it before
        overwriting *exp_.  Use return NULL_TREE instead of return 0.

        * gcc.dg/torture/pr89091.c: New test.

Added:
    branches/gcc-8-branch/gcc/testsuite/gcc.dg/torture/pr89091.c
Modified:
    branches/gcc-8-branch/gcc/ChangeLog
    branches/gcc-8-branch/gcc/fold-const.c
    branches/gcc-8-branch/gcc/testsuite/ChangeLog


More information about the Gcc-bugs mailing list