One more missing check for DECL_INITIAL being non-NULL.
This commit is contained in:
parent
d2806feea4
commit
fc278ede3a
3
external/gpl3/gcc/dist/gcc/varasm.c
vendored
3
external/gpl3/gcc/dist/gcc/varasm.c
vendored
@ -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;
|
||||
|
Loading…
Reference in New Issue
Block a user