Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/external/gpl3/gcc/dist/gcc One more missing check for DECL_I...



details:   https://anonhg.NetBSD.org/src/rev/d078b093fcd7
branches:  trunk
changeset: 825572:d078b093fcd7
user:      joerg <joerg%NetBSD.org@localhost>
date:      Sat Jul 22 20:52:52 2017 +0000

description:
One more missing check for DECL_INITIAL being non-NULL.

diffstat:

 external/gpl3/gcc/dist/gcc/varasm.c |  3 ++-
 1 files changed, 2 insertions(+), 1 deletions(-)

diffs (13 lines):

diff -r 44fb2124433b -r d078b093fcd7 external/gpl3/gcc/dist/gcc/varasm.c
--- a/external/gpl3/gcc/dist/gcc/varasm.c       Sat Jul 22 20:21:09 2017 +0000
+++ b/external/gpl3/gcc/dist/gcc/varasm.c       Sat Jul 22 20:52:52 2017 +0000
@@ -6428,7 +6428,8 @@
           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;



Home | Main Index | Thread Index | Old Index