From: ro Date: Fri, 13 May 2016 09:08:15 +0000 (+0000) Subject: Fix SEGV in ix86_in_large_data_p (PR target/71080) X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=6c9412663fcdccea4dfdae00718cebfa17fb4d7d;p=thirdparty%2Fgcc.git Fix SEGV in ix86_in_large_data_p (PR target/71080) PR target/71080 * config/i386/i386.c (ix86_in_large_data_p): Guard against NULL exp. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@236196 138bc75d-0d04-0410-961f-82ee72b054a4 --- diff --git a/gcc/ChangeLog b/gcc/ChangeLog index d21e5da77157..93fa74308c9a 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,8 @@ +2016-05-13 Rainer Orth + + PR target/71080 + * config/i386/i386.c (ix86_in_large_data_p): Guard against NULL exp. + 2016-05-13 Eric Botcazou * builtins.c (expand_builtin_memcmp): Do not emit the call here. diff --git a/gcc/config/i386/i386.c b/gcc/config/i386/i386.c index 44580149f396..501e26f22fef 100644 --- a/gcc/config/i386/i386.c +++ b/gcc/config/i386/i386.c @@ -6823,6 +6823,9 @@ ix86_in_large_data_p (tree exp) if (ix86_cmodel != CM_MEDIUM && ix86_cmodel != CM_MEDIUM_PIC) return false; + if (exp == NULL_TREE) + return false; + /* Functions are never large data. */ if (TREE_CODE (exp) == FUNCTION_DECL) return false;