diff options
author | Ben Cheng <bccheng@google.com> | 2013-08-05 15:18:29 -0700 |
---|---|---|
committer | Ben Cheng <bccheng@google.com> | 2013-08-05 16:03:48 -0700 |
commit | 32fce3edda831e36ee484406c39dffbe0230f257 (patch) | |
tree | 733b1b5398304b260a4ee3d5d9b17da5038c5486 /gcc-4.8/gcc/varasm.c | |
parent | e85b9ca2afe8edbb9fa99c6ce2cc4e52dce18c21 (diff) | |
download | toolchain_gcc-32fce3edda831e36ee484406c39dffbe0230f257.tar.gz toolchain_gcc-32fce3edda831e36ee484406c39dffbe0230f257.tar.bz2 toolchain_gcc-32fce3edda831e36ee484406c39dffbe0230f257.zip |
[4.8] Merge GCC 4.8.1
Change-Id: Ic8a60b7563f5172440fd40788605163a0cca6e30
Diffstat (limited to 'gcc-4.8/gcc/varasm.c')
-rw-r--r-- | gcc-4.8/gcc/varasm.c | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/gcc-4.8/gcc/varasm.c b/gcc-4.8/gcc/varasm.c index 664810310..ea709fd8e 100644 --- a/gcc-4.8/gcc/varasm.c +++ b/gcc-4.8/gcc/varasm.c @@ -402,12 +402,16 @@ get_named_section (tree decl, const char *name, int reloc) { unsigned int flags; - gcc_assert (!decl || DECL_P (decl)); if (name == NULL) - name = TREE_STRING_POINTER (DECL_SECTION_NAME (decl)); + { + gcc_assert (decl && DECL_P (decl) && DECL_SECTION_NAME (decl)); + name = TREE_STRING_POINTER (DECL_SECTION_NAME (decl)); + } flags = targetm.section_type_flags (decl, name, reloc); + if (decl && !DECL_P (decl)) + decl = NULL_TREE; return get_section (name, flags, decl); } @@ -5989,7 +5993,7 @@ default_section_type_flags (tree decl, const char *name, int reloc) flags |= SECTION_RELRO; } - if (decl && DECL_ONE_ONLY (decl)) + if (decl && DECL_P (decl) && DECL_ONE_ONLY (decl)) flags |= SECTION_LINKONCE; if (decl && TREE_CODE (decl) == VAR_DECL && DECL_THREAD_LOCAL_P (decl)) @@ -6348,8 +6352,6 @@ default_elf_select_section (tree decl, int reloc, gcc_unreachable (); } - if (!DECL_P (decl)) - decl = NULL_TREE; return get_named_section (decl, sname, reloc); } |