aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--gcc/ChangeLog6
-rw-r--r--gcc/config/darwin.c4
2 files changed, 9 insertions, 1 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog
index e8732d7..86380ee 100644
--- a/gcc/ChangeLog
+++ b/gcc/ChangeLog
@@ -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
diff --git a/gcc/config/darwin.c b/gcc/config/darwin.c
index 66d1ab0..307698d 100644
--- a/gcc/config/darwin.c
+++ b/gcc/config/darwin.c
@@ -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];