------- 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  <[EMAIL PROTECTED]>

        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

Reply via email to