aboutsummaryrefslogtreecommitdiff
path: root/gcc/varasm.c
diff options
context:
space:
mode:
authorBernd Edlinger <bernd.edlinger@hotmail.de>2018-10-10 18:32:47 +0000
committerBernd Edlinger <edlinger@gcc.gnu.org>2018-10-10 18:32:47 +0000
commit3846751b82fdf80aa13982ef44f81f43c5cf150e (patch)
treeb579c737652eff8e92049739c71e3462136d5262 /gcc/varasm.c
parente3129f233c57ff39eeb2406bffd480fa0a6a0a8b (diff)
downloadgcc-3846751b82fdf80aa13982ef44f81f43c5cf150e.zip
gcc-3846751b82fdf80aa13982ef44f81f43c5cf150e.tar.gz
gcc-3846751b82fdf80aa13982ef44f81f43c5cf150e.tar.bz2
varasm.c (mergeable_string_section): Don't try to move zero-length strings to the merge section.
2018-10-10 Bernd Edlinger <bernd.edlinger@hotmail.de> * varasm.c (mergeable_string_section): Don't try to move zero-length strings to the merge section. From-SVN: r265025
Diffstat (limited to 'gcc/varasm.c')
-rw-r--r--gcc/varasm.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/gcc/varasm.c b/gcc/varasm.c
index c789a03..78cb000 100644
--- a/gcc/varasm.c
+++ b/gcc/varasm.c
@@ -804,7 +804,7 @@ mergeable_string_section (tree decl ATTRIBUTE_UNUSED,
&& TREE_CODE (decl) == STRING_CST
&& TREE_CODE (TREE_TYPE (decl)) == ARRAY_TYPE
&& align <= 256
- && (len = int_size_in_bytes (TREE_TYPE (decl))) >= 0
+ && (len = int_size_in_bytes (TREE_TYPE (decl))) > 0
&& TREE_STRING_LENGTH (decl) == len)
{
scalar_int_mode mode;