]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
re PR target/34622 (gcc.c-torture/execute/20000801-4.c fails at -O1 and above)
authorJakub Jelinek <jakub@redhat.com>
Mon, 7 Jan 2008 21:49:27 +0000 (22:49 +0100)
committerJakub Jelinek <jakub@gcc.gnu.org>
Mon, 7 Jan 2008 21:49:27 +0000 (22:49 +0100)
PR target/34622
* config/darwin.c (darwin_mergeable_string_section): Don't use
.cstring if int_size_in_bytes != TREE_STRING_LENGTH.

From-SVN: r131386

gcc/ChangeLog
gcc/config/darwin.c

index e8732d7c5e3145a86b3ed47151d150ca9b157690..86380ee773bd480cf992b3de308e6b9dcff61b26 100644 (file)
@@ -1,3 +1,9 @@
+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.
+
 2008-01-07  Uros Bizjak  <ubizjak@gmail.com>
 
        PR target/34682
index 66d1ab046475c6765b36077abee83c18fb3ae4aa..307698d095f71b1e76191477f136d13b0d5bfd9a 100644 (file)
@@ -1,6 +1,6 @@
 /* Functions for generic Darwin as target machine for GNU C compiler.
    Copyright (C) 1989, 1990, 1991, 1992, 1993, 2000, 2001, 2002, 2003, 2004,
-   2005, 2006, 2007
+   2005, 2006, 2007, 2008
    Free Software Foundation, Inc.
    Contributed by Apple Computer Inc.
 
@@ -1136,6 +1136,8 @@ darwin_mergeable_string_section (tree exp,
       && 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];