From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 25910 invoked by alias); 14 Oct 2012 05:52:25 -0000 Received: (qmail 25860 invoked by uid 48); 14 Oct 2012 05:52:02 -0000 From: "dominiq at lps dot ens.fr" To: gcc-bugs@gcc.gnu.org Subject: [Bug target/54404] [4.8 Regression] *cfstring* failures for (obj-c|g)++ on *-apple-darwin* after revision 186789 Date: Sun, 14 Oct 2012 05:52:00 -0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: target X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: dominiq at lps dot ens.fr X-Bugzilla-Status: NEW X-Bugzilla-Priority: P3 X-Bugzilla-Assigned-To: unassigned at gcc dot gnu.org X-Bugzilla-Target-Milestone: 4.8.0 X-Bugzilla-Changed-Fields: Status Last reconfirmed Ever Confirmed Message-ID: In-Reply-To: References: X-Bugzilla-URL: http://gcc.gnu.org/bugzilla/ Auto-Submitted: auto-generated Content-Type: text/plain; charset="UTF-8" MIME-Version: 1.0 Mailing-List: contact gcc-bugs-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Archive: List-Post: List-Help: Sender: gcc-bugs-owner@gcc.gnu.org X-SW-Source: 2012-10/txt/msg01293.txt.bz2 http://gcc.gnu.org/bugzilla/show_bug.cgi?id=54404 Dominique d'Humieres changed: What |Removed |Added ---------------------------------------------------------------------------- Status|UNCONFIRMED |NEW Last reconfirmed| |2012-10-14 Ever Confirmed|0 |1 --- Comment #2 from Dominique d'Humieres 2012-10-14 05:51:59 UTC --- > This is a follow up of pr53283 for the remaining failures of some *cfstring* > tests on *-apple-darwin* after revision 186789: ... This was an over simplification of the problem. On x86_64-apple-darwin10 revision 186789 introduced an ICE g++.dg/other/darwin-cfstring1.C:13:80: internal compiler error: in ix86_expand_builtin, at config/i386/i386.c:30398 fixed between revisions 189336 and 189490 (likely 189391). The errors reported in comment #0 appeared only after the ICE has been fixed. On powerpc-apple-darwin9 the failures appeared between revisions 186440 (OK) and 187171 (failures). For the test g++.dg/other/darwin-cfstring1.C, the error changed between revisions 186788 and 189490 from /opt/gcc/work/gcc/testsuite/g++.dg/other/darwin-cfstring1.C: In function 'int main()': /opt/gcc/work/gcc/testsuite/g++.dg/other/darwin-cfstring1.C:21:20: error: CFString literal expression is not a string constant /opt/gcc/work/gcc/testsuite/g++.dg/other/darwin-cfstring1.C:22:20: error: CFString literal expression is not a string constant to /opt/gcc/work/gcc/testsuite/g++.dg/other/darwin-cfstring1.C: In function 'int main()': /opt/gcc/work/gcc/testsuite/g++.dg/other/darwin-cfstring1.C:13:79: error: CFString literal expression is not a string constant /opt/gcc/work/gcc/testsuite/g++.dg/other/darwin-cfstring1.C:21:20: note: in expansion of macro 'CFSTR' /opt/gcc/work/gcc/testsuite/g++.dg/other/darwin-cfstring1.C:13:79: error: CFString literal expression is not a string constant /opt/gcc/work/gcc/testsuite/g++.dg/other/darwin-cfstring1.C:22:20: note: in expansion of macro 'CFSTR' The following patch adjusts the errors/notes to the present pattern while hopefully retaining the intent of the original test --- ../_clean/gcc/testsuite/g++.dg/other/darwin-cfstring1.C 2010-10-23 22:17:07.000000000 +0200 +++ gcc/testsuite/g++.dg/other/darwin-cfstring1.C 2012-10-13 23:54:37.000000000 +0200 @@ -10,7 +10,7 @@ #ifdef __CONSTANT_CFSTRINGS__ #undef CFSTR -#define CFSTR(STR) ((CFStringRef) __builtin___CFStringMakeConstantString (STR)) +#define CFSTR(STR) ((CFStringRef) __builtin___CFStringMakeConstantString (STR)) /* { dg-error "CFString literal expression is not a string constant" } */ #endif extern int cond; @@ -18,8 +18,8 @@ extern const char *func(void); int main(void) { CFStringRef s1 = CFSTR("Str1"); - CFStringRef s2 = CFSTR(cond? "Str2": "Str3"); /* { dg-error "CFString literal expression is not a string constant" } */ - CFStringRef s3 = CFSTR(func()); /* { dg-error "CFString literal expression is not a string constant" } */ + CFStringRef s2 = CFSTR(cond? "Str2": "Str3"); /* { dg-message "note: in expansion of macro 'CFSTR'" } */ + CFStringRef s3 = CFSTR(func()); /* { dg-message "note: in expansion of macro 'CFSTR'" } */ return 0; } The situation for the test obj-c++.dg/strings/const-cfstring-2.mm is more puzzling. The failures appeared in the same revision frame and is due to the fact that the lines CFStringRef s4 = CFSTR("\222 - Non-ASCII literal"); /* { dg-warning "non-ASCII character in CFString literal" } */ CFStringRef s5 = CFSTR("Non-ASCII (\222) literal"); /* { dg-warning "non-ASCII character in CFString literal" } */ ... CFStringRef s7 = CFSTR("Embedded \0NUL"); /* { dg-warning "embedded NUL in CFString literal" } */ CFStringRef s8 = CFSTR("Embedded NUL\0"); /* { dg-warning "embedded NUL in CFString literal" } */ do not give the expected warnings, while the lines NSString *s3 = @"Non-ASCII literal - \222"; /* { dg-warning "non-ASCII character in CFString literal" } */ NSString *s6 = @"\0Embedded NUL"; /* { dg-warning "embedded NUL in CFString literal" } */ do: the NSString lines work as expected, but the CFStringRef one don't.