From fc278ede3ae01589017bb16741dc3f4b869efa37 Mon Sep 17 00:00:00 2001 From: joerg Date: Sat, 22 Jul 2017 20:52:52 +0000 Subject: [PATCH] One more missing check for DECL_INITIAL being non-NULL. --- external/gpl3/gcc/dist/gcc/varasm.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/external/gpl3/gcc/dist/gcc/varasm.c b/external/gpl3/gcc/dist/gcc/varasm.c index 34512e6101e0..4ceda0baf2bc 100644 --- a/external/gpl3/gcc/dist/gcc/varasm.c +++ b/external/gpl3/gcc/dist/gcc/varasm.c @@ -6428,7 +6428,8 @@ categorize_decl_for_section (const_tree decl, int reloc) location. -fmerge-all-constants allows even that (at the expense of not conforming). */ ret = SECCAT_RODATA; - else if (TREE_CODE (DECL_INITIAL (decl)) == STRING_CST) + else if (DECL_INITIAL (decl) != NULL + && TREE_CODE (DECL_INITIAL (decl)) == STRING_CST) ret = SECCAT_RODATA_MERGE_STR_INIT; else ret = SECCAT_RODATA_MERGE_CONST;