From 44cb09ea6b2164e8392e3001b0ba5b93093bfa07 Mon Sep 17 00:00:00 2001 From: Rainer Orth Date: Fri, 13 May 2016 09:08:15 +0000 Subject: [PATCH] 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. From-SVN: r236196 --- gcc/ChangeLog | 5 +++++ gcc/config/i386/i386.c | 3 +++ 2 files changed, 8 insertions(+) diff --git a/gcc/ChangeLog b/gcc/ChangeLog index d21e5da7715..93fa74308c9 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 44580149f39..501e26f22fe 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; -- 2.30.2