This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug middle-end/34622] [4.3 Regression] gcc.c-torture/execute/20000801-4.c fails at -O1 and above
- From: "jakub at gcc dot gnu dot org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 7 Jan 2008 14:59:53 -0000
- Subject: [Bug middle-end/34622] [4.3 Regression] gcc.c-torture/execute/20000801-4.c fails at -O1 and above
- References: <bug-34622-12313@http.gcc.gnu.org/bugzilla/>
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
------- Comment #9 from jakub at gcc dot gnu dot org 2008-01-07 14:59 -------
Guess you want something like:
2008-01-07 Jakub Jelinek <jakub@redhat.com>
PR target/34622
* config/darwin.c (darwin_mergeable_string_section): Don't use
.cstring if int_size_in_bytes != TREE_STRING_LENGTH.
--- gcc/config/darwin.c.jj 2007-10-11 10:54:22.000000000 +0200
+++ gcc/config/darwin.c 2008-01-07 15:57:52.000000000 +0100
@@ -1136,6 +1136,8 @@ darwin_mergeable_string_section (tree ex
&& TREE_CODE (exp) == STRING_CST
&& TREE_CODE (TREE_TYPE (exp)) == ARRAY_TYPE
&& align <= 256
+ && (int_size_in_bytes (TREE_TYPE (exp))
+ == TREE_STRING_LENGTH (exp))
&& ((size_t) TREE_STRING_LENGTH (exp)
== strlen (TREE_STRING_POINTER (exp)) + 1))
return darwin_sections[cstring_section];
But, it is not a regression in that case, even 4.1 had that bug.
Can't test on darwin though...
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=34622