[Bug analyzer/98969] [11 Regression] ICE: Segmentation fault (in print_mem_ref)

jakub at gcc dot gnu.org gcc-bugzilla@gcc.gnu.org
Fri Feb 5 14:08:09 GMT 2021


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

--- Comment #5 from Jakub Jelinek <jakub at gcc dot gnu.org> ---
Yeah, seems the analyzer looked through the cast, so either it shouldn't, or it
needs to readd the cast in there.

As for print_mem_ref, if we wanted to protect it from bogus MEM_REF creation
(not sure about if we want to), the right change IMHO would be to set
access_type to
NULL_TREE if TREE_TYPE (arg) doesn't have POINTER_TYPE_P, and in the spots that
use access_type treat access_type NULL as unknown access type, e.g. access_cast
should be true if access_type is NULL, and char_cast should be true too.


More information about the Gcc-bugs mailing list