summaryrefslogtreecommitdiff
path: root/gcc/config/i386/i386.c
diff options
context:
space:
mode:
authorro <ro@138bc75d-0d04-0410-961f-82ee72b054a4>2016-05-13 09:08:15 +0000
committerro <ro@138bc75d-0d04-0410-961f-82ee72b054a4>2016-05-13 09:08:15 +0000
commit6c9412663fcdccea4dfdae00718cebfa17fb4d7d (patch)
tree2b7e8514dce86435e1359c9bd10d4eda7e0a0326 /gcc/config/i386/i386.c
parent61ffc71aadedd5dd408837317609fcfaca1213e9 (diff)
downloadgcc-6c9412663fcdccea4dfdae00718cebfa17fb4d7d.tar.gz
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
Diffstat (limited to 'gcc/config/i386/i386.c')
-rw-r--r--gcc/config/i386/i386.c3
1 files changed, 3 insertions, 0 deletions
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;