re PR target/34622 (gcc.c-torture/execute/20000801-4.c fails at -O1 and above)

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
This commit is contained in:
Jakub Jelinek 2008-01-07 22:49:27 +01:00 committed by Jakub Jelinek
parent 6dd116bef6
commit b69d564b66
2 changed files with 9 additions and 1 deletions

View 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> 2008-01-07 Uros Bizjak <ubizjak@gmail.com>
PR target/34682 PR target/34682

View File

@ -1,6 +1,6 @@
/* Functions for generic Darwin as target machine for GNU C compiler. /* Functions for generic Darwin as target machine for GNU C compiler.
Copyright (C) 1989, 1990, 1991, 1992, 1993, 2000, 2001, 2002, 2003, 2004, Copyright (C) 1989, 1990, 1991, 1992, 1993, 2000, 2001, 2002, 2003, 2004,
2005, 2006, 2007 2005, 2006, 2007, 2008
Free Software Foundation, Inc. Free Software Foundation, Inc.
Contributed by Apple Computer Inc. Contributed by Apple Computer Inc.
@ -1136,6 +1136,8 @@ darwin_mergeable_string_section (tree exp,
&& TREE_CODE (exp) == STRING_CST && TREE_CODE (exp) == STRING_CST
&& TREE_CODE (TREE_TYPE (exp)) == ARRAY_TYPE && TREE_CODE (TREE_TYPE (exp)) == ARRAY_TYPE
&& align <= 256 && align <= 256
&& (int_size_in_bytes (TREE_TYPE (exp))
== TREE_STRING_LENGTH (exp))
&& ((size_t) TREE_STRING_LENGTH (exp) && ((size_t) TREE_STRING_LENGTH (exp)
== strlen (TREE_STRING_POINTER (exp)) + 1)) == strlen (TREE_STRING_POINTER (exp)) + 1))
return darwin_sections[cstring_section]; return darwin_sections[cstring_section];