This is a follow up of pr53283 for the remaining failures of some *cfstring* tests on *-apple-darwin* after revision 186789: FAIL: g++.dg/other/darwin-cfstring1.C -std=gnu++98 (test for errors, line 21) FAIL: g++.dg/other/darwin-cfstring1.C -std=gnu++98 (test for errors, line 22) FAIL: g++.dg/other/darwin-cfstring1.C -std=gnu++98 (test for excess errors) FAIL: g++.dg/other/darwin-cfstring1.C -std=gnu++11 (test for errors, line 21) FAIL: g++.dg/other/darwin-cfstring1.C -std=gnu++11 (test for errors, line 22) FAIL: g++.dg/other/darwin-cfstring1.C -std=gnu++11 (test for excess errors) FAIL: obj-c++.dg/strings/const-cfstring-2.mm -fnext-runtime (test for warnings, line 22) FAIL: obj-c++.dg/strings/const-cfstring-2.mm -fnext-runtime (test for warnings, line 23) FAIL: obj-c++.dg/strings/const-cfstring-2.mm -fnext-runtime (test for warnings, line 25) FAIL: obj-c++.dg/strings/const-cfstring-2.mm -fnext-runtime (test for warnings, line 26) The errors are Excess errors: /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:13:79: error: CFString literal expression is not a string constant or /opt/gcc/work/gcc/testsuite/obj-c++.dg/strings/const-cfstring-2.mm: In function 'void foo()': /opt/gcc/work/gcc/testsuite/obj-c++.dg/strings/const-cfstring-2.mm:21:18: warning: non-ASCII character in CFString literal [--CLASSPATH] /opt/gcc/work/gcc/testsuite/obj-c++.dg/strings/const-cfstring-2.mm:24:18: warning: embedded NUL in CFString literal [--CLASSPATH] i.e., missing warnings for obj-c++.
Below is a trace through current gcc trunk for the failure of... FAIL: g++.dg/other/darwin-cfstring1.C -std=gnu++98 (test for errors, line 21) at -m32 with darwin.c built at -O0 for debugging purposes. # gdb /sw/src/fink.build/gcc48-4.8.0-1000/darwin_objdir/gcc/testsuite/g++/../../cc1plus ... (gdb) break darwin.c:3310 ... (gdb) r -quiet -nostdinc++ -v -I /sw/src/fink.build/gcc48-4.8.0-1000/darwin_objdir/x86_64-apple-darwin12.2.0/i386/libstdc++-v3/include/x86_64-apple-darwin12.2.0 -I /sw/src/fink.build/gcc48-4.8.0-1000/darwin_objdir/x86_64-apple-darwin12.2.0/i386/libstdc++-v3/include -I /sw/src/fink.build/gcc48-4.8.0-1000/gcc-4.8-20121011/libstdc++-v3/libsupc++ -I /sw/src/fink.build/gcc48-4.8.0-1000/gcc-4.8-20121011/libstdc++-v3/include/backward -I /sw/src/fink.build/gcc48-4.8.0-1000/gcc-4.8-20121011/libstdc++-v3/testsuite/util -imultilib i386 -iprefix /sw/src/fink.build/gcc48-4.8.0-1000/darwin_objdir/gcc/../lib/gcc/x86_64-apple-darwin12.2.0/4.8.0/ -isystem /sw/src/fink.build/gcc48-4.8.0-1000/darwin_objdir/gcc/testsuite/g++/../../include -isystem /sw/src/fink.build/gcc48-4.8.0-1000/darwin_objdir/gcc/testsuite/g++/../../include-fixed -D__DYNAMIC__ /sw/src/fink.build/gcc48-4.8.0-1000/gcc-4.8-20121011/gcc/testsuite/g++.dg/other/darwin-cfstring1.C -fPIC -quiet -dumpbase darwin-cfstring1.C -mmacosx-version-min=10.8.2 -mconstant-cfstrings -m32 -mtune=core2 -auxbase-strip darwin-cfstring1.s -std=gnu++98 -version -fno-diagnostics-show-caret -fmessage-length=0 -o darwin-cfstring1.s ... Breakpoint 1, darwin_build_constant_cfstring (str=0x10104dbc0) at ../../gcc-4.8-20121011/gcc/config/darwin.c:3316 3316 if (!str) (gdb) c Continuing. Current language: auto; currently c++ Breakpoint 1, darwin_build_constant_cfstring (str=0x10104ddc0) at ../../gcc-4.8-20121011/gcc/config/darwin.c:3316 3316 if (!str) (gdb) s 3322 STRIP_NOPS (str); (gdb) tree_strip_nop_conversions (exp=0x10104ddc0) at ../../gcc-4.8-20121011/gcc/tree.c:11254 11254 { (gdb) 11204 if (!CONVERT_EXPR_P (exp) (gdb) 4047 char const __c = TREE_CODE_CLASS (TREE_CODE (__t)); (gdb) 4048 if (!IS_EXPR_CODE_CLASS (__c)) (gdb) 4092 if (VL_EXP_CLASS_P (node)) (gdb) 4095 return TREE_CODE_LENGTH (TREE_CODE (node)); (gdb) 4127 if (__i < 0 || __i >= TREE_OPERAND_LENGTH (__u)) (gdb) 11207 if (TREE_OPERAND (exp, 0) == error_mark_node) (gdb) 3995 if (tree_contains_struct[TREE_CODE(__t)][__s] != 1) (gdb) 4092 if (VL_EXP_CLASS_P (node)) (gdb) 11210 outer_type = TREE_TYPE (exp); (gdb) 4092 if (VL_EXP_CLASS_P (node)) (gdb) 4095 return TREE_CODE_LENGTH (TREE_CODE (node)); (gdb) 4127 if (__i < 0 || __i >= TREE_OPERAND_LENGTH (__u)) (gdb) 3785 if (tree_contains_struct[TREE_CODE(__t)][__s] != 1) (gdb) 11211 inner_type = TREE_TYPE (TREE_OPERAND (exp, 0)); (gdb) 11213 if (!inner_type) (gdb) 11219 || POINTER_TYPE_P (outer_type) (gdb) 11221 && (INTEGRAL_TYPE_P (inner_type) (gdb) 11222 || POINTER_TYPE_P (inner_type) (gdb) 11221 && (INTEGRAL_TYPE_P (inner_type) (gdb) 3794 if (TREE_CODE_CLASS (TREE_CODE(__t)) != __class) (gdb) 11224 return TYPE_PRECISION (outer_type) == TYPE_PRECISION (inner_type); (gdb) 3794 if (TREE_CODE_CLASS (TREE_CODE(__t)) != __class) (gdb) 11224 return TYPE_PRECISION (outer_type) == TYPE_PRECISION (inner_type); (gdb) 11255 while (tree_nop_conversion (exp)) (gdb) 3839 char const __c = TREE_CODE_CLASS (TREE_CODE (__t)); (gdb) 3840 if (!IS_EXPR_CODE_CLASS (__c)) (gdb) 4092 if (VL_EXP_CLASS_P (node)) (gdb) 4095 return TREE_CODE_LENGTH (TREE_CODE (node)); (gdb) 4106 if (__i < 0 || __i >= TREE_OPERAND_LENGTH (__u)) (gdb) 11256 exp = TREE_OPERAND (exp, 0); (gdb) 11204 if (!CONVERT_EXPR_P (exp) (gdb) 11205 && TREE_CODE (exp) != NON_LVALUE_EXPR) (gdb) 11258 } (gdb) darwin_build_constant_cfstring (str=0x1429c1e40) at ../../gcc-4.8-20121011/gcc/config/darwin.c:3324 3324 if (TREE_CODE (str) == ADDR_EXPR) (gdb) 3327 if (TREE_CODE (str) != STRING_CST) (gdb) 3329 error ("CFString literal expression is not a string constant"); (gdb) /sw/src/fink.build/gcc48-4.8.0-1000/gcc-4.8-20121011/gcc/testsuite/g++.dg/other/darwin-cfstring1.C: In function ‘int main()’: /sw/src/fink.build/gcc48-4.8.0-1000/gcc-4.8-20121011/gcc/testsuite/g++.dg/other/darwin-cfstring1.C:13:79: error: CFString literal expression is not a string constant /sw/src/fink.build/gcc48-4.8.0-1000/gcc-4.8-20121011/gcc/testsuite/g++.dg/other/darwin-cfstring1.C:21:20: note: in expansion of macro 'CFSTR' Breakpoint 1, darwin_build_constant_cfstring (str=0x1429c1e70) at ../../gcc-4.8-20121011/gcc/config/darwin.c:3316 3316 if (!str) (gdb) 3322 STRIP_NOPS (str); (gdb) tree_strip_nop_conversions (exp=0x1429c1e70) at ../../gcc-4.8-20121011/gcc/tree.c:11254 11254 { (gdb) 11204 if (!CONVERT_EXPR_P (exp) (gdb) 11205 && TREE_CODE (exp) != NON_LVALUE_EXPR) (gdb) 11258 } (gdb) darwin_build_constant_cfstring (str=0x1429c1e70) at ../../gcc-4.8-20121011/gcc/config/darwin.c:3324 3324 if (TREE_CODE (str) == ADDR_EXPR) (gdb) 3327 if (TREE_CODE (str) != STRING_CST) (gdb) 3329 error ("CFString literal expression is not a string constant"); (gdb) /sw/src/fink.build/gcc48-4.8.0-1000/gcc-4.8-20121011/gcc/testsuite/g++.dg/other/darwin-cfstring1.C:13:79: error: CFString literal expression is not a string constant /sw/src/fink.build/gcc48-4.8.0-1000/gcc-4.8-20121011/gcc/testsuite/g++.dg/other/darwin-cfstring1.C:22:20: note: in expansion of macro 'CFSTR' Program exited with code 01.
> 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.
After having applied the patch for r189391, a bissection gives the range 186973 (old behavior) 186980 (new one). I think the change occurs after 186977 and the patch is obvious (see objc.dg/foreach-7.m at r186976): --- ../_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-14 21:02:58.000000000 +0200 @@ -4,7 +4,7 @@ /* Developed by Ziemowit Laski <zlaski@apple.com>. */ /* { dg-do compile { target *-*-darwin* } } */ -/* { dg-options "-mconstant-cfstrings" } */ +/* { dg-options "-ftrack-macro-expansion=0 -mconstant-cfstrings" } */ #include <CoreFoundation/CFString.h> --- ../_clean/gcc/testsuite/obj-c++.dg/strings/const-cfstring-2.mm 2010-10-22 13:23:41.000000000 +0200 +++ gcc/testsuite/obj-c++.dg/strings/const-cfstring-2.mm 2012-10-14 21:11:08.000000000 +0200 @@ -6,7 +6,7 @@ /* So far, CFString is darwin-only. */ /* { dg-do compile { target *-*-darwin* } } */ /* { dg-skip-if "NeXT only" { *-*-* } { "-fgnu-runtime" } { "" } } */ -/* { dg-options "-mconstant-cfstrings -Wnonportable-cfstrings" } */ +/* { dg-options "-ftrack-macro-expansion=0 -mconstant-cfstrings -Wnonportable-cfstrings" } */ #import <Foundation/NSString.h> #import <CoreFoundation/CFString.h> Patch tested on x86_64-apple-darwin10 and powerpc-apple-darwin9.
(In reply to comment #3) Also confirmed on x86_64-apple-darwin12 that this eliminates the failures in obj-c++.dg/strings/const-cfstring-2.mm. On darwin12 at least, this still leaves the failures in... obj-c++.dg/torture/strings/const-str-10.mm obj-c++.dg/torture/strings/const-str-11.mm obj-c++.dg/torture/strings/const-str-9.mm obj-c++.dg/torture/strings/string1.mm to be addressed as well as those in objc... objc.dg/strings/const-cfstring-5.m objc.dg/strings/const-str-12b.m objc.dg/torture/strings/const-str-10.m objc.dg/torture/strings/const-str-11.m objc.dg/torture/strings/const-str-9.m objc.dg/torture/strings/string1.m http://gcc.gnu.org/ml/gcc-testresults/2012-10/msg01368.html
> ... On darwin12 at least, this still leaves the failures in... > > obj-c++.dg/torture/strings/const-str-10.mm > obj-c++.dg/torture/strings/const-str-11.mm > obj-c++.dg/torture/strings/const-str-9.mm > obj-c++.dg/torture/strings/string1.mm > > to be addressed as well as those in objc... > > objc.dg/strings/const-cfstring-5.m > objc.dg/strings/const-str-12b.m > objc.dg/torture/strings/const-str-10.m > objc.dg/torture/strings/const-str-11.m > objc.dg/torture/strings/const-str-9.m > objc.dg/torture/strings/string1.m I don't see these errors on darwin10. Could you look at the errors in the log files and try to sort them by categories.
These are not failing with Xcode 4.2 on darwin10 but are with Xcode 4.5.1 on darwin12 as follows... Executing on host: /sw/src/fink.build/gcc48-4.8.0-1000/darwin_objdir/gcc/testsuite/obj-c++/../../g++ -B/sw/src/fink.build/gcc48-4.8.0-1000/darwin_objdir/gcc/testsuite/obj-c++/../../ /sw/src/fink.build/gcc48-4.8.0-1000/gcc-4.8-20121017/gcc/testsuite/obj-c++.dg/torture/strings/const-str-10.mm -fno-diagnostics-show-caret -nostdinc++ -I/sw/src/fink.build/gcc48-4.8.0-1000/darwin_objdir/x86_64-apple-darwin12.2.0/libstdc++-v3/include/x86_64-apple-darwin12.2.0 -I/sw/src/fink.build/gcc48-4.8.0-1000/darwin_objdir/x86_64-apple-darwin12.2.0/libstdc++-v3/include -I/sw/src/fink.build/gcc48-4.8.0-1000/gcc-4.8-20121017/libstdc++-v3/libsupc++ -I/sw/src/fink.build/gcc48-4.8.0-1000/gcc-4.8-20121017/libstdc++-v3/include/backward -I/sw/src/fink.build/gcc48-4.8.0-1000/gcc-4.8-20121017/libstdc++-v3/testsuite/util -fmessage-length=0 -O0 -fnext-runtime -mno-constant-cfstrings -S -m64 -o const-str-10.s (timeout = 300) /sw/src/fink.build/gcc48-4.8.0-1000/gcc-4.8-20121017/gcc/testsuite/obj-c++.dg/torture/strings/const-str-10.mm:12:22: error: cannot find interface declaration for 'Object', superclass of 'NSString'^M /sw/src/fink.build/gcc48-4.8.0-1000/gcc-4.8-20121017/gcc/testsuite/obj-c++.dg/torture/strings/const-str-10.mm:31:34: error: interface 'NSConstantString' does not have valid constant string layout^M .... FAIL: obj-c++.dg/torture/strings/const-str-10.mm -O0 -fnext-runtime (test for excess errors) The same error occurs for obj-c++.dg/torture/strings/const-str-11.mm and obj-c++.dg/torture/strings/const-str-9.mm. The obj-c++.dg/torture/strings/string1.mm failure on darwin12 is as follows... Executing on host: /sw/src/fink.build/gcc48-4.8.0-1000/darwin_objdir/gcc/testsuite/obj-c++/../../g++ -B/sw/src/fink.build/gcc48-4.8.0-1000/darwin_objdir/gcc/testsuite/obj-c++/../../ /sw/src/fink.build/gcc48-4.8.0-1000/gcc-4.8-20121017/gcc/testsuite/obj-c++.dg/torture/strings/string1.mm -fno-diagnostics-show-caret -nostdinc++ -I/sw/src/fink.build/gcc48-4.8.0-1000/darwin_objdir/x86_64-apple-darwin12.2.0/i386/libstdc++-v3/include/x86_64-apple-darwin12.2.0 -I/sw/src/fink.build/gcc48-4.8.0-1000/darwin_objdir/x86_64-apple-darwin12.2.0/i386/libstdc++-v3/include -I/sw/src/fink.build/gcc48-4.8.0-1000/gcc-4.8-20121017/libstdc++-v3/libsupc++ -I/sw/src/fink.build/gcc48-4.8.0-1000/gcc-4.8-20121017/libstdc++-v3/include/backward -I/sw/src/fink.build/gcc48-4.8.0-1000/gcc-4.8-20121017/libstdc++-v3/testsuite/util -fmessage-length=0 -O2 -flto -flto-partition=none -fnext-runtime -mno-constant-cfstrings /sw/src/fink.build/gcc48-4.8.0-1000/gcc-4.8-20121017/gcc/testsuite/obj-c++.dg/torture/strings/../../../objc-obj-c++-shared/nsconstantstring-class-impl.mm -B/sw/src/fink.build/gcc48-4.8.0-1000/darwin_objdir/x86_64-apple-darwin12.2.0/i386/libstdc++-v3/src/.libs -L/sw/src/fink.build/gcc48-4.8.0-1000/darwin_objdir/x86_64-apple-darwin12.2.0/i386/libstdc++-v3/src/.libs -B/sw/src/fink.build/gcc48-4.8.0-1000/darwin_objdir/x86_64-apple-darwin12.2.0/i386/libstdc++-v3/src/.libs -L/sw/src/fink.build/gcc48-4.8.0-1000/darwin_objdir/x86_64-apple-darwin12.2.0/i386/libstdc++-v3/src/.libs -B/sw/src/fink.build/gcc48-4.8.0-1000/darwin_objdir/x86_64-apple-darwin12.2.0/i386/libobjc/.libs -L/sw/src/fink.build/gcc48-4.8.0-1000/darwin_objdir/x86_64-apple-darwin12.2.0/i386/libobjc/.libs -multiply_defined suppress -lobjc -lm -m32 -o ./string1.exe (timeout = 300) ld: warning: section __OBJC/__image_info has unexpectedly large size 16 in /var/tmp//ccoRzvrL.lto.o^M output is: ld: warning: section __OBJC/__image_info has unexpectedly large size 16 in /var/tmp//ccoRzvrL.lto.o^M FAIL: obj-c++.dg/torture/strings/string1.mm -O2 -flto -flto-partition=none -fnext-runtime (test for excess errors)
The failure for objc.dg/strings/const-cfstring-5.m on darwin12 is as follows... Executing on host: /sw/src/fink.build/gcc48-4.8.0-1000/darwin_objdir/gcc/xgcc -B/sw/src/fink.build/gcc48-4.8.0-1000/darwin_objdir/gcc/ /sw/src/fink.build/gcc48-4.8.0-1000/gcc-4.8-20121017/gcc/testsuite/objc.dg/strings/const-cfstring-5.m -fno-diagnostics-show-caret -fnext-runtime -mconstant-cfstrings -B/sw/src/fink.build/gcc48-4.8.0-1000/darwin_objdir/x86_64-apple-darwin12.2.0/./libobjc/.libs -L/sw/src/fink.build/gcc48-4.8.0-1000/darwin_objdir/x86_64-apple-darwin12.2.0/./libobjc/.libs -S -m64 -o const-cfstring-5.s (timeout = 300) /sw/src/fink.build/gcc48-4.8.0-1000/gcc-4.8-20121017/gcc/testsuite/objc.dg/strings/const-cfstring-5.m:11:1: error: cannot find interface declaration for 'Object', superclass of 'Foo'^M /sw/src/fink.build/gcc48-4.8.0-1000/gcc-4.8-20121017/gcc/testsuite/objc.dg/strings/const-cfstring-5.m:19:1: error: cannot find interface declaration for 'Object', superclass of 'Bar'^M ... FAIL: objc.dg/strings/const-cfstring-5.m -fnext-runtime (test for excess errors) The failure of objc.dg/strings/const-str-12b.m is as follows... Executing on host: /sw/src/fink.build/gcc48-4.8.0-1000/darwin_objdir/gcc/xgcc -B/sw/src/fink.build/gcc48-4.8.0-1000/darwin_objdir/gcc/ /sw/src/fink.build/gcc48-4.8.0-1000/gcc-4.8-20121017/gcc/testsuite/objc.dg/strings/const-str-12b.m -fno-diagnostics-show-caret -fnext-runtime -mno-constant-cfstrings -fconstant-string-class=Foo -B/sw/src/fink.build/gcc48-4.8.0-1000/darwin_objdir/x86_64-apple-darwin12.2.0/./libobjc/.libs -L/sw/src/fink.build/gcc48-4.8.0-1000/darwin_objdir/x86_64-apple-darwin12.2.0/./libobjc/.libs -S -m64 -o const-str-12b.s (timeout = 300) /sw/src/fink.build/gcc48-4.8.0-1000/gcc-4.8-20121017/gcc/testsuite/objc.dg/strings/const-str-12b.m:11:1: error: cannot find interface declaration for 'Object', superclass of 'Foo'^M /sw/src/fink.build/gcc48-4.8.0-1000/gcc-4.8-20121017/gcc/testsuite/objc.dg/strings/const-str-12b.m:19:1: error: cannot find interface declaration for 'Object', superclass of 'Bar'^M /sw/src/fink.build/gcc48-4.8.0-1000/gcc-4.8-20121017/gcc/testsuite/objc.dg/strings/const-str-12b.m: In function '+[Bar getString:]':^M /sw/src/fink.build/gcc48-4.8.0-1000/gcc-4.8-20121017/gcc/testsuite/objc.dg/strings/const-str-12b.m:26:3: error: interface 'Foo' does not have valid constant string layout^M ... FAIL: objc.dg/strings/const-str-12b.m -fnext-runtime (test for excess errors) The failure in objc.dg/torture/strings/const-str-11.m appears as... Executing on host: /sw/src/fink.build/gcc48-4.8.0-1000/darwin_objdir/gcc/xgcc -B/sw/src/fink.build/gcc48-4.8.0-1000/darwin_objdir/gcc/ /sw/src/fink.build/gcc48-4.8.0-1000/gcc-4.8-20121017/gcc/testsuite/objc.dg/torture/strings/const-str-11.m -fno-diagnostics-show-caret -O0 -fnext-runtime -mno-constant-cfstrings -fconstant-string-class=XStr -B/sw/src/fink.build/gcc48-4.8.0-1000/darwin_objdir/x86_64-apple-darwin12.2.0/./libobjc/.libs -L/sw/src/fink.build/gcc48-4.8.0-1000/darwin_objdir/x86_64-apple-darwin12.2.0/./libobjc/.libs -S -m64 -o const-str-11.s (timeout = 300) /sw/src/fink.build/gcc48-4.8.0-1000/gcc-4.8-20121017/gcc/testsuite/objc.dg/torture/strings/const-str-11.m:13:1: error: cannot find interface declaration for 'Object', superclass of 'XString'^M /sw/src/fink.build/gcc48-4.8.0-1000/gcc-4.8-20121017/gcc/testsuite/objc.dg/torture/strings/const-str-11.m:31:1: error: interface 'XStr' does not have valid constant string layout^M .... FAIL: objc.dg/torture/strings/const-str-11.m -O0 -fnext-runtime (test for excess errors) which is the same as in obj-c++. The failures of objc.dg/torture/strings/const-str-10.m and objc.dg/torture/strings/const-str-9.m and objc.dg/torture/strings/string1.m are the same as in obj-c++.
(In reply to comment #5) > > I don't see these errors on darwin10. Could you look at the errors in the log > files and try to sort them by categories. Only the errors... FAIL: obj-c++.dg/torture/strings/string1.mm -O2 -flto -flto-partition=none -fnext-runtime (test for excess errors) FAIL: obj-c++.dg/torture/strings/string1.mm -O2 -flto -fnext-runtime (test for excess errors) are seen on darwin11 with Xcode 4.5.1 (which potentially could be a linker bug so I'll open a radar). The remaining failures are darwin12 only and might represent ABI changes in 10.8 perhaps.
Note the the string1.m/string1.mm failures are from warnings and the resulting binaries run fine.
(In reply to comment #9) > Note the the string1.m/string1.mm failures are from warnings and the resulting > binaries run fine. These linker warnings are http://gcc.gnu.org/bugzilla/show_bug.cgi?id=48094. I also see these failures under darwin10 with Xcode 4.2's linker. This linker warning doesn't occur with the linker from Xcode 3.2.6 under darwin10.
The darwin12 specific non-linker failures are suppressed if... -isysroot `xcode-select --print-path`/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.7.sdk is added to the compilation flags indicating that this is an ABI change.
Created attachment 28470 [details] preprocessed source for const-str-10.m against 10.7 SDK /sw/src/fink.build/gcc48-4.8.0-1000/darwin_objdir/gcc/xgcc -B/sw/src/fink.build/gcc48-4.8.0-1000/darwin_objdir/gcc/ /sw/src/fink.build/gcc48-4.8.0-1000/gcc-4.8-20121017/gcc/testsuite/objc.dg/torture/strings/const-str-10.m -fno-diagnostics-show-caret -O0 -fnext-runtime -mno-constant-cfstrings -B/sw/src/fink.build/gcc48-4.8.0-1000/darwin_objdir/x86_64-apple-darwin12.2.0/./libobjc/.libs -L/sw/src/fink.build/gcc48-4.8.0-1000/darwin_objdir/x86_64-apple-darwin12.2.0/./libobjc/.libs -S -m64 -isysroot `xcode-select --print-path`/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.7.sdk -o const-str-10.s --save-temps
Created attachment 28471 [details] preprocessed source for const-str-10.m against 10.8 SDK /sw/src/fink.build/gcc48-4.8.0-1000/darwin_objdir/gcc/xgcc -B/sw/src/fink.build/gcc48-4.8.0-1000/darwin_objdir/gcc/ /sw/src/fink.build/gcc48-4.8.0-1000/gcc-4.8-20121017/gcc/testsuite/objc.dg/torture/strings/const-str-10.m -fno-diagnostics-show-caret -O0 -fnext-runtime -mno-constant-cfstrings -B/sw/src/fink.build/gcc48-4.8.0-1000/darwin_objdir/x86_64-apple-darwin12.2.0/./libobjc/.libs -L/sw/src/fink.build/gcc48-4.8.0-1000/darwin_objdir/x86_64-apple-darwin12.2.0/./libobjc/.libs -S -m64 -o const-str-10.s --save-temps /sw/src/fink.build/gcc48-4.8.0-1000/gcc-4.8-20121017/gcc/testsuite/objc.dg/torture/strings/const-str-10.m:13:1: error: cannot find interface declaration for ‘Object’, superclass of ‘NSString’ /sw/src/fink.build/gcc48-4.8.0-1000/gcc-4.8-20121017/gcc/testsuite/objc.dg/torture/strings/const-str-10.m:31:1: error: interface ‘NSConstantString’ does not have valid constant string layout
Created attachment 28472 [details] diff of preprocessed sources for const-str-10.m against 10.7 and 10.8 SDK
Author: iains Date: Sat Oct 27 11:31:06 2012 New Revision: 192874 URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=192874 Log: gcc/testsuite: 2012-10-27 Dominique Dhumieres <dominiq@lps.ens.fr> Jack Howarth <howarth@bromo.med.uc.edu> PR target/54404 * g++.dg/other/darwin-cfstring1.C: Add -ftrack-macro-expansion=0 to dg-options. * obj-c++.dg/strings/const-cfstring-2.mm: Likewise. Modified: trunk/gcc/testsuite/ChangeLog trunk/gcc/testsuite/g++.dg/other/darwin-cfstring1.C trunk/gcc/testsuite/obj-c++.dg/strings/const-cfstring-2.mm
On Sat, Oct 27, 2012 at 11:31:10AM +0000, iains at gcc dot gnu.org wrote: > > http://gcc.gnu.org/bugzilla/show_bug.cgi?id=54404 > > --- Comment #15 from Iain Sandoe <iains at gcc dot gnu.org> 2012-10-27 11:31:10 UTC --- > Author: iains > Date: Sat Oct 27 11:31:06 2012 > New Revision: 192874 > > URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=192874 > Log: > gcc/testsuite: > 2012-10-27 Dominique Dhumieres <dominiq@lps.ens.fr> > Jack Howarth <howarth@bromo.med.uc.edu> > > PR target/54404 > * g++.dg/other/darwin-cfstring1.C: Add -ftrack-macro-expansion=0 > to dg-options. > * obj-c++.dg/strings/const-cfstring-2.mm: Likewise. > > > Modified: > trunk/gcc/testsuite/ChangeLog > trunk/gcc/testsuite/g++.dg/other/darwin-cfstring1.C > trunk/gcc/testsuite/obj-c++.dg/strings/const-cfstring-2.mm > > -- > Configure bugmail: http://gcc.gnu.org/bugzilla/userprefs.cgi?tab=email > ------- You are receiving this mail because: ------- > You are on the CC list for the bug. Iain, Thanks. Could you also commit... http://gcc.gnu.org/ml/gcc-patches/2012-10/msg02448.html which was approved by Mike here... http://gcc.gnu.org/ml/gcc-patches/2012-10/msg02453.html Thanks in advance. Jack
Fixed?
(In reply to comment #17) > Fixed? Note on x86_64-apple-darwin12 which uses a newer Objective C runtime. There are failures in... FAIL: objc.dg/torture/strings/const-str-10.m -O0 -fnext-runtime (test for excess errors) FAIL: objc.dg/torture/strings/const-str-10.m -O1 -fnext-runtime (test for excess errors) FAIL: objc.dg/torture/strings/const-str-10.m -O2 -fnext-runtime (test for excess errors) FAIL: objc.dg/torture/strings/const-str-10.m -O3 -fomit-frame-pointer -fnext-runtime (test for excess errors) FAIL: objc.dg/torture/strings/const-str-10.m -O3 -g -fnext-runtime (test for excess errors) FAIL: objc.dg/torture/strings/const-str-10.m -Os -fnext-runtime (test for excess errors) FAIL: objc.dg/torture/strings/const-str-10.m -O2 -flto -flto-partition=none -fnext-runtime (test for excess errors) FAIL: objc.dg/torture/strings/const-str-10.m -O2 -flto -fnext-runtime (test for excess errors) FAIL: objc.dg/torture/strings/const-str-11.m -O0 -fnext-runtime (test for excess errors) FAIL: objc.dg/torture/strings/const-str-11.m -O1 -fnext-runtime (test for excess errors) FAIL: objc.dg/torture/strings/const-str-11.m -O2 -fnext-runtime (test for excess errors) FAIL: objc.dg/torture/strings/const-str-11.m -O3 -fomit-frame-pointer -fnext-runtime (test for excess errors) FAIL: objc.dg/torture/strings/const-str-11.m -O3 -g -fnext-runtime (test for excess errors) FAIL: objc.dg/torture/strings/const-str-11.m -Os -fnext-runtime (test for excess errors) FAIL: objc.dg/torture/strings/const-str-11.m -O2 -flto -flto-partition=none -fnext-runtime (test for excess errors) FAIL: objc.dg/torture/strings/const-str-11.m -O2 -flto -fnext-runtime (test for excess errors) FAIL: objc.dg/torture/strings/const-str-9.m -O0 -fnext-runtime (test for excess errors) FAIL: objc.dg/torture/strings/const-str-9.m -O1 -fnext-runtime (test for excess errors) FAIL: objc.dg/torture/strings/const-str-9.m -O2 -fnext-runtime (test for excess errors) FAIL: objc.dg/torture/strings/const-str-9.m -O3 -fomit-frame-pointer -fnext-runtime (test for excess errors) FAIL: objc.dg/torture/strings/const-str-9.m -O3 -g -fnext-runtime (test for excess errors) FAIL: objc.dg/torture/strings/const-str-9.m -Os -fnext-runtime (test for excess errors) FAIL: objc.dg/torture/strings/const-str-9.m -O2 -flto -flto-partition=none -fnext-runtime (test for excess errors) FAIL: objc.dg/torture/strings/const-str-9.m -O2 -flto -fnext-runtime (test for excess errors) FAIL: objc.dg/torture/strings/string1.m -O2 -flto -flto-partition=none -fnext-runtime (test for excess errors) FAIL: objc.dg/torture/strings/string1.m -O2 -flto -fnext-runtime (test for excess errors) FAIL: objc.dg/torture/strings/string2.m -O2 -flto -flto-partition=none -fnext-runtime (test for excess errors) FAIL: objc.dg/torture/strings/string2.m -O2 -flto -fnext-runtime (test for excess errors) FAIL: objc.dg/torture/strings/string3.m -O2 -flto -flto-partition=none -fnext-runtime (test for excess errors) FAIL: objc.dg/torture/strings/string3.m -O2 -flto -fnext-runtime (test for excess errors) FAIL: objc.dg/torture/strings/string4.m -O2 -flto -flto-partition=none -fnext-runtime (test for excess errors) FAIL: objc.dg/torture/strings/string4.m -O2 -flto -fnext-runtime (test for excess errors) of the form... Executing on host: /sw/src/fink.build/gcc48-4.8.0-1000/darwin_objdir/gcc/xgcc -B/sw/src/fink.build/gcc48-4.8.0-1000/darwin_objdir/gcc/ /sw/src/fink.build/gcc48-4.8.0-1000/gcc-4.8-20121206/gcc/testsuite/objc.dg/torture/strings/const-str-10.m -fno-diagnostics-show-caret -O0 -fnext-runtime -mno-constant-cfstrings -B/sw/src/fink.build/gcc48-4.8.0-1000/darwin_objdir/x86_64-apple-darwin12.2.0/./libobjc/.libs -L/sw/src/fink.build/gcc48-4.8.0-1000/darwin_objdir/x86_64-apple-darwin12.2.0/./libobjc/.libs -S -m64 -o const-str-10.s (timeout = 300) /sw/src/fink.build/gcc48-4.8.0-1000/gcc-4.8-20121206/gcc/testsuite/objc.dg/torture/strings/const-str-10.m:13:1: error: cannot find interface declaration for 'Object', superclass of 'NSString'^M /sw/src/fink.build/gcc48-4.8.0-1000/gcc-4.8-20121206/gcc/testsuite/objc.dg/torture/strings/const-str-10.m:31:1: error: interface 'NSConstantString' does not have valid constant string layout^M compiler exited with status 1 output is: /sw/src/fink.build/gcc48-4.8.0-1000/gcc-4.8-20121206/gcc/testsuite/objc.dg/torture/strings/const-str-10.m:13:1: error: cannot find interface declaration for 'Object', superclass of 'NSString'^M /sw/src/fink.build/gcc48-4.8.0-1000/gcc-4.8-20121206/gcc/testsuite/objc.dg/torture/strings/const-str-10.m:31:1: error: interface 'NSConstantString' does not have valid constant string layout^M FAIL: objc.dg/torture/strings/const-str-10.m -O0 -fnext-runtime (test for excess errors)
This may be related to the changes described here... http://blog.ablepear.com/2012/02/something-wonderful-new-objective-c.html
Note that on Mountain Lion using the 10.7 SDK solves the failures... # /sw/src/fink.build/gcc48-4.8.0-1000/darwin_objdir/gcc/xgcc -B/sw/src/fink.build/gcc48-4.8.0-1000/darwin_objdir/gcc/ /sw/src/fink.build/gcc48-4.8.0-1000/gcc-4.8-20121206/gcc/testsuite/objc.dg/torture/strings/const-str-10.m -fno-diagnostics-show-caret -O0 -fnext-runtime -mno-constant-cfstrings -B/sw/src/fink.build/gcc48-4.8.0-1000/darwin_objdir/x86_64-apple-darwin12.2.0/./libobjc/.libs -L/sw/src/fink.build/gcc48-4.8.0-1000/darwin_objdir/x86_64-apple-darwin12.2.0/./libobjc/.libs -S -m64 --sysroot=/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.7.sdk -o const-str-10.s #
(In reply to comment #18) > > Fixed? > > Note on x86_64-apple-darwin12 which uses a newer Objective C runtime. There are > failures in... It would probably be nice to open a new PR for the post-darwin10 failures and to close this one as fixed.
On Fri, Dec 07, 2012 at 01:50:40PM +0000, dominiq at lps dot ens.fr wrote: > > http://gcc.gnu.org/bugzilla/show_bug.cgi?id=54404 > > --- Comment #21 from Dominique d'Humieres <dominiq at lps dot ens.fr> 2012-12-07 13:50:40 UTC --- > (In reply to comment #18) > > > Fixed? > > > > Note on x86_64-apple-darwin12 which uses a newer Objective C runtime. There are > > failures in... > > It would probably be nice to open a new PR for the post-darwin10 failures and > to close this one as fixed. Actually we need one for post-darwin11 failures and another for those unique to post-darwin12. > > -- > Configure bugmail: http://gcc.gnu.org/bugzilla/userprefs.cgi?tab=email > ------- You are receiving this mail because: ------- > You are on the CC list for the bug.
The question is what remaining failures are actually regressions and which SVN revision introduced them if they are regressions.
> Actually we need one for post-darwin11 failures and another for those unique to > post-darwin12. Jack, I don't have access to darwin11 or 12. Could you open the PR(s) you think necessary, then I'll close this one as fixed.
The remaining issues for obj(c|-c++) are now tracked by PR 55654 and 55656. Closing this one as fixed.