From: Bernd Edlinger Date: Wed, 10 Oct 2018 18:32:47 +0000 (+0000) Subject: varasm.c (mergeable_string_section): Don't try to move zero-length strings to the... X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=3846751b82fdf80aa13982ef44f81f43c5cf150e;p=gcc.git varasm.c (mergeable_string_section): Don't try to move zero-length strings to the merge section. 2018-10-10 Bernd Edlinger * varasm.c (mergeable_string_section): Don't try to move zero-length strings to the merge section. From-SVN: r265025 --- diff --git a/gcc/ChangeLog b/gcc/ChangeLog index b1f4d7f5eb7..81171bedf33 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,8 @@ +2018-10-10 Bernd Edlinger + + * varasm.c (mergeable_string_section): Don't try to move zero-length + strings to the merge section. + 2018-10-10 Uros Bizjak PR target/87573 diff --git a/gcc/varasm.c b/gcc/varasm.c index c789a03e1f3..78cb000ca04 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;