https://gcc.gnu.org/bugzilla/show_bug.cgi?id=63651

--- Comment #10 from Dominique d'Humieres <dominiq at lps dot ens.fr> ---
If I replace the files /usr/include/objc/NSObject.h and
/System/Library/Frameworks/Foundation.framework/Headers/NSString.h with the
corresponding files from
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.9.sdk/
The errors reduce to

        === obj-c++ tests ===


Running target unix/-m32
FAIL: obj-c++.dg/cxx-ivars-3.mm -fnext-runtime execution test
FAIL: obj-c++.dg/gnu-api-2-objc.mm -fnext-runtime execution test

        === obj-c++ Summary for unix/-m32 ===

# of expected passes        3151
# of unexpected failures    2
# of expected failures        2
# of unsupported tests        68

Running target unix/-m64
FAIL: obj-c++.dg/gnu-api-2-objc.mm -fnext-runtime execution test
FAIL: obj-c++.dg/isa-field-1.mm -fnext-runtime (test for excess errors)
FAIL: obj-c++.dg/try-catch-2.mm -fnext-runtime execution test
FAIL: obj-c++.dg/try-catch-9.mm -fnext-runtime execution test

        === obj-c++ Summary for unix/-m64 ===

# of expected passes        3090
# of unexpected failures    4
# of expected failures        19
# of unsupported tests        74

        === obj-c++ Summary ===

# of expected passes        6241
# of unexpected failures    6
# of expected failures        21
# of unsupported tests        142
/opt/gcc/p_build/gcc/testsuite/obj-c++/../../xg++  version 5.0.0 20141219
(experimental) [trunk revision 218883p2] (GCC) 

        === objc tests ===


Running target unix/-m32
FAIL: objc.dg/call-super-2.m -fnext-runtime  (test for warnings, line 104)
FAIL: objc.dg/call-super-2.m -fnext-runtime  (test for warnings, line 74)
FAIL: objc.dg/gnu-api-2-objc.m -fnext-runtime execution test
FAIL: objc.dg/ivar-scope-4.m -fnext-runtime execution test
FAIL: objc.dg/objc-foreach-4.m -fnext-runtime (test for excess errors)
UNRESOLVED: objc.dg/objc-foreach-4.m -fnext-runtime compilation failed to
produce executable
UNRESOLVED: objc.dg/objc-foreach-5.m -fnext-runtime  scan-assembler
_addStuffUp:
FAIL: objc.dg/objc-foreach-5.m -fnext-runtime (test for excess errors)

        === objc Summary for unix/-m32 ===

# of expected passes        6124
# of unexpected failures    6
# of expected failures        6
# of unresolved testcases    2
# of unsupported tests        85

Running target unix/-m64
FAIL: objc.dg/call-super-2.m -fnext-runtime  (test for warnings, line 104)
FAIL: objc.dg/call-super-2.m -fnext-runtime  (test for warnings, line 74)
FAIL: objc.dg/exceptions-2.m -fnext-runtime execution test
FAIL: objc.dg/gnu-api-2-objc.m -fnext-runtime execution test
FAIL: objc.dg/isa-field-1.m -fnext-runtime (test for excess errors)
FAIL: objc.dg/objc-foreach-4.m -fnext-runtime (test for excess errors)
UNRESOLVED: objc.dg/objc-foreach-4.m -fnext-runtime compilation failed to
produce executable
UNRESOLVED: objc.dg/objc-foreach-5.m -fnext-runtime  scan-assembler
_addStuffUp:
FAIL: objc.dg/objc-foreach-5.m -fnext-runtime (test for excess errors)
FAIL: objc.dg/torture/forward-1.m   -O0  -fnext-runtime execution test
FAIL: objc.dg/torture/forward-1.m   -O1  -fnext-runtime execution test
FAIL: objc.dg/torture/forward-1.m   -O2  -fnext-runtime execution test
FAIL: objc.dg/torture/forward-1.m   -O2 -flto  -fnext-runtime execution test
FAIL: objc.dg/torture/forward-1.m   -O2 -flto -flto-partition=none 
-fnext-runtime execution test
FAIL: objc.dg/torture/forward-1.m   -O3 -fomit-frame-pointer  -fnext-runtime
execution test
FAIL: objc.dg/torture/forward-1.m   -O3 -fomit-frame-pointer -funroll-all-loops
-finline-functions  -fnext-runtime execution test
FAIL: objc.dg/torture/forward-1.m   -O3 -fomit-frame-pointer -funroll-loops 
-fnext-runtime execution test
FAIL: objc.dg/torture/forward-1.m   -O3 -g  -fnext-runtime execution test
FAIL: objc.dg/torture/forward-1.m   -Os  -fnext-runtime execution test

        === objc Summary for unix/-m64 ===

# of expected passes        5957
# of unexpected failures    17
# of expected failures        6
# of unresolved testcases    2
# of unsupported tests        91

        === objc Summary ===

# of expected passes        12081
# of unexpected failures    23
# of expected failures        12
# of unresolved testcases    4
# of unsupported tests        176
/opt/gcc/p_build/gcc/xgcc  version 5.0.0 20141219 (experimental) [trunk
revision 218883p2] (GCC) 

The new failures compared to darwin13 are

FAIL: obj-c++.dg/isa-field-1.mm -fnext-runtime (test for excess errors)

with -m64,

FAIL: objc.dg/objc-foreach-4.m -fnext-runtime (test for excess errors)
UNRESOLVED: objc.dg/objc-foreach-4.m -fnext-runtime compilation failed to
produce executable
UNRESOLVED: objc.dg/objc-foreach-5.m -fnext-runtime  scan-assembler
_addStuffUp:
FAIL: objc.dg/objc-foreach-5.m -fnext-runtime (test for excess errors)

with -m32, and

FAIL: objc.dg/isa-field-1.m -fnext-runtime (test for excess errors)
FAIL: objc.dg/objc-foreach-4.m -fnext-runtime (test for excess errors)
UNRESOLVED: objc.dg/objc-foreach-4.m -fnext-runtime compilation failed to
produce executable
UNRESOLVED: objc.dg/objc-foreach-5.m -fnext-runtime  scan-assembler
_addStuffUp:
FAIL: objc.dg/objc-foreach-5.m -fnext-runtime (test for excess errors)
FAIL: objc.dg/torture/forward-1.m   -O0  -fnext-runtime execution test
FAIL: objc.dg/torture/forward-1.m   -O1  -fnext-runtime execution test
FAIL: objc.dg/torture/forward-1.m   -O2  -fnext-runtime execution test
FAIL: objc.dg/torture/forward-1.m   -O2 -flto  -fnext-runtime execution test
FAIL: objc.dg/torture/forward-1.m   -O2 -flto -flto-partition=none 
-fnext-runtime execution test
FAIL: objc.dg/torture/forward-1.m   -O3 -fomit-frame-pointer  -fnext-runtime
execution test
FAIL: objc.dg/torture/forward-1.m   -O3 -fomit-frame-pointer -funroll-all-loops
-finline-functions  -fnext-runtime execution test
FAIL: objc.dg/torture/forward-1.m   -O3 -fomit-frame-pointer -funroll-loops 
-fnext-runtime execution test
FAIL: objc.dg/torture/forward-1.m   -O3 -g  -fnext-runtime execution test
FAIL: objc.dg/torture/forward-1.m   -Os  -fnext-runtime execution test

with -m64. The errors for are of the kind

objc[1436]: -[Forwarder display]: unrecognized selector sent to instance
0x7f9ce9d04f30 (no message forward handler is installed)

Is there a canonical way to force obj(c|-c++) to use the include files in
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.9.sdk/
instead of the native files in /usr and /System?

Note that some remaining errors will go away if the same is used for
/System/Library/Frameworks/Foundation.framework/Headers/NSArray.h.

Reply via email to