re PR middle-end/89091 (ICE: Segmentation fault (in tree_class_check))
authorJakub Jelinek <jakub@redhat.com>
Wed, 20 Feb 2019 23:01:41 +0000 (00:01 +0100)
committerJakub Jelinek <jakub@gcc.gnu.org>
Wed, 20 Feb 2019 23:01:41 +0000 (00:01 +0100)
commitcd56fb7957a9b2b685f7dec2db6307bde5a0d4f0
tree07ffe1091210a8bbe5c67b162c409fec3ac87f3d
parentb2d6c9e88c22c18b1109bb39f265f64fffdbb901
re PR middle-end/89091 (ICE: Segmentation fault (in tree_class_check))

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.

Co-Authored-By: David Malcolm <dmalcolm@redhat.com>
From-SVN: r269056
gcc/ChangeLog
gcc/fold-const.c
gcc/testsuite/ChangeLog
gcc/testsuite/gcc.dg/torture/pr89091.c [new file with mode: 0644]