Module Name: src
Committed By: joerg
Date: Sat Jul 22 20:52:52 UTC 2017
Modified Files:
src/external/gpl3/gcc/dist/gcc: varasm.c
Log Message:
One more missing check for DECL_INITIAL being non-NULL.
To generate a diff of this commit:
cvs rdiff -u -r1.2 -r1.3 src/external/gpl3/gcc/dist/gcc/varasm.c
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
Modified files:
Index: src/external/gpl3/gcc/dist/gcc/varasm.c
diff -u src/external/gpl3/gcc/dist/gcc/varasm.c:1.2 src/external/gpl3/gcc/dist/gcc/varasm.c:1.3
--- src/external/gpl3/gcc/dist/gcc/varasm.c:1.2 Mon Jul 17 19:53:10 2017
+++ src/external/gpl3/gcc/dist/gcc/varasm.c Sat Jul 22 20:52:52 2017
@@ -6428,7 +6428,8 @@ categorize_decl_for_section (const_tree
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;