[Bug testsuite/69573] FAIL: gcc.dg/pr61053.c (test for excess errors)
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=69573 --- Comment #18 from Chen Gang --- (In reply to Martin Sebor from comment #17) > Patch committed in r233564. Sorry for replying late (I am in holiday during these days, and no any x86 environments). Your patch is OK to me. But I guess, providing more details will be helpful for other members: For ia32, gcc includes intel common environments (e.g. linux) and mac environments. Size of long double can be get by "echo | gcc -m32 -dM -E - | grep LONG_DOUBLE", linux is 12, mac is 16. For long double alignment can be get by building the c code: "int alignof_long_double = _Alignof (long double); long double ld = 1;", linux is 4, mac is 16. For most archs, size of long double should be 16, so checking the special case should be OK (check intel common ia32, and remove "{ target { ! { ia32 } } }"). If any other archs report failure, we can add another switch macros just like this patch has done. Thanks.
[Bug testsuite/69573] FAIL: gcc.dg/pr61053.c (test for excess errors)
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=69573 Martin Sebor changed: What|Removed |Added Status|NEW |RESOLVED Resolution|--- |FIXED --- Comment #17 from Martin Sebor --- Patch committed in r233564.
[Bug testsuite/69573] FAIL: gcc.dg/pr61053.c (test for excess errors)
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=69573 --- Comment #16 from Martin Sebor --- Author: msebor Date: Fri Feb 19 18:37:40 2016 New Revision: 233564 URL: https://gcc.gnu.org/viewcvs?rev=233564=gcc=rev Log: PR testsuite/69573 - FAIL: gcc.dg/pr61053.c (test for excess errors) Tested on x86_64 by running make check-c with RUNTESTFLAGS='--target_board=unix/-m32/-m128bit-long-double dg.exp=pr61053.c' gcc/testsuite/ChangeLog: 2016-01-30 Martin SeborPR testsuite/69573 * gcc.dg/pr61053.c: Tweaked test to avoid bogus failures. Modified: trunk/gcc/testsuite/ChangeLog trunk/gcc/testsuite/gcc.dg/pr61053.c
[Bug testsuite/69573] FAIL: gcc.dg/pr61053.c (test for excess errors)
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=69573 --- Comment #10 from Martin Sebor --- Sorry, the first comment on the assembly should have said -m32, like so: .long 16<<< _Alignof(long double) with -m32
[Bug testsuite/69573] FAIL: gcc.dg/pr61053.c (test for excess errors)
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=69573 --- Comment #9 from Martin Sebor --- I built the x86_64-apple-darwin15.3.0 cross-compiler to better understand what the problem is but I don't see it. The cross compiler says the size and alignment of long double is 16 in both ILP32 (with -m32) and LP64. So the patched test should pass without any further changes. Can you let me know the target triple of your GCC and the result of _Alignof(long double)? Below is what I get: $ (set -x; cat t.c && for m in 32 64; do /build/sysroot/x86_64-apple-darwin15.3.0/bin/x86_64-apple-darwin15.3.0-gcc -S -Wall -m$m -o/dev/stdout -std=c11 t.c; done) + cat t.c int alignof_long_double = _Alignof (long double); long double ld = 1; + for m in 32 64 + /build/sysroot/x86_64-apple-darwin15.3.0/bin/x86_64-apple-darwin15.3.0-gcc -S -Wall -m32 -o/dev/stdout -std=c11 t.c .globl _alignof_long_double .data .align 2 _alignof_long_double: .long 16<<< _Alignof(long double) in -m64 .globl _ld .align 4 <<< alignment of ld (2^4 bytes) _ld: .long 0 .long 2147483648 .long 16383 .long 0 .subsections_via_symbols + for m in 32 64 + /build/sysroot/x86_64-apple-darwin15.3.0/bin/x86_64-apple-darwin15.3.0-gcc -S -Wall -m64 -o/dev/stdout -std=c11 t.c .globl _alignof_long_double .data .align 2 _alignof_long_double: .long 16<<< _Alignof(long double) with -m64 .globl _ld .align 4 <<< alignment of ld (2^4 bytes) _ld: .long 0 .long 2147483648 .long 16383 .long 0 .subsections_via_symbols
[Bug testsuite/69573] FAIL: gcc.dg/pr61053.c (test for excess errors)
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=69573 --- Comment #8 from Martin Sebor --- (In reply to Chen Gang from comment #7) > Can we check __APPLE_CC__ instead of __SIZEOF_LONG_DOUBLE__ ? Thanks for testing the patch! It sounds like on this target, even though sizeof(long double) is 16, its alignment requirement is less than that. Let me see if I can come up with a general solution for this. If not, I'll go with your suggestion and poste an updated patch for review.
[Bug testsuite/69573] FAIL: gcc.dg/pr61053.c (test for excess errors)
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=69573 Dominique d'Humieres changed: What|Removed |Added Status|UNCONFIRMED |NEW Last reconfirmed||2016-02-10 Ever confirmed|0 |1 --- Comment #11 from Dominique d'Humieres --- On x86_64-apple-darwin15 the test succeeds with the following patch --- ../_clean/gcc/testsuite/gcc.dg/pr61053.c2014-09-19 12:53:07.0 +0200 +++ gcc/testsuite/gcc.dg/pr61053.c 2016-02-10 19:08:52.0 +0100 @@ -67,9 +67,9 @@ _Alignas (long double) double dld; _Alignas (char) long double ldc; /* { dg-error "cannot reduce alignment" } */ _Alignas (short int) long double lds; /* { dg-error "cannot reduce alignment" } */ -_Alignas (int) long double ldi; /* { dg-error "cannot reduce alignment" "" { target { ! { ia32 } } } } */ -_Alignas (long int) long double ldl; /* { dg-error "cannot reduce alignment" "" { target { ! { ia32 } } } } */ -_Alignas (long long int) long double ldll; /* { dg-error "cannot reduce alignment" "" { target { ! { ia32 } } } } */ -_Alignas (float) long double ldf; /* { dg-error "cannot reduce alignment" "" { target { ! { ia32 } } } } */ -_Alignas (double) long double ldd; /* { dg-error "cannot reduce alignment" "" { target { ! { ia32 } } } } */ +_Alignas (int) long double ldi; /* { dg-error "cannot reduce alignment" } */ +_Alignas (long int) long double ldl; /* { dg-error "cannot reduce alignment" } */ +_Alignas (long long int) long double ldll; /* { dg-error "cannot reduce alignment" } */ +_Alignas (float) long double ldf; /* { dg-error "cannot reduce alignment" } */ +_Alignas (double) long double ldd; /* { dg-error "cannot reduce alignment" } */ _Alignas (long double) long double ldld;
[Bug testsuite/69573] FAIL: gcc.dg/pr61053.c (test for excess errors)
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=69573 --- Comment #12 from Martin Sebor --- (In reply to Dominique d'Humieres from comment #11) Thanks for the update. That is what I would expect as well. But removing the "{ target { ! { ia32 } } }" directives without doing anything for targets where the alignment of long double is less than 16 (such as IA32 where it's 4) will cause failures there. The patch I referenced in comment #2 is designed to avoid those failures. Does the patch let the test pass on x86_64-apple-darwin15, both with -m32 and -m64?
[Bug testsuite/69573] FAIL: gcc.dg/pr61053.c (test for excess errors)
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=69573 --- Comment #13 from Dominique d'Humieres --- > Does the patch let the test pass on x86_64-apple-darwin15, > both with -m32 and -m64? Yes.
[Bug testsuite/69573] FAIL: gcc.dg/pr61053.c (test for excess errors)
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=69573 --- Comment #14 from Chen Gang --- (In reply to Martin Sebor from comment #2) > Patch posted for review: > https://gcc.gnu.org/ml/gcc-patches/2016-01/msg02372.html For your original patch, my test result is below (only compare 5 result files, because of "make check" fails), I am not quite sure whether it is OK, please check, thanks. ShengShiZhuChengdeMacBook-Pro:gcc sszc$ sudo ./contrib/compare_tests ../build-gcc ../build-gcc-new Password: # Comparing directories ## Dir1=../build-gcc:5 sum files ## Dir2=../build-gcc-new:5 sum files # Comparing5 common sum files ## /bin/sh ./contrib/compare_tests /tmp/gxx-sum1.388 /tmp/gxx-sum2.388 Tests that now fail, but worked before: c-c++-common/asan/halt_on_error-1.c -O0 execution test c-c++-common/asan/halt_on_error-1.c -O1 execution test c-c++-common/asan/halt_on_error-1.c -O2 execution test c-c++-common/asan/halt_on_error-1.c -O3 -g execution test c-c++-common/asan/halt_on_error-1.c -Os execution test c-c++-common/asan/strncpy-overflow-1.c -O0 execution test gcc.dg/pch/save-temps-1.c -O0 -g -I. -Dwith_PCH (test for excess errors) Tests that now work, but didn't before: c-c++-common/asan/halt_on_error-1.c -O0 execution test c-c++-common/asan/halt_on_error-1.c -O1 execution test c-c++-common/asan/halt_on_error-1.c -O2 execution test c-c++-common/asan/halt_on_error-1.c -O3 -g execution test c-c++-common/asan/halt_on_error-1.c -Os execution test c-c++-common/asan/strncpy-overflow-1.c -O0 execution test New tests that FAIL: gcc.dg/pch/save-temps-1.c -O0 -g assembly comparison New tests that PASS: gcc.dg/pr61053.c (test for errors, line 80) gcc.dg/pr61053.c (test for errors, line 81) gcc.dg/pr61053.c (test for errors, line 82) gcc.dg/pr61053.c (test for errors, line 83) gcc.dg/pr61053.c (test for errors, line 84) Old tests that passed, that have disappeared: (Eeek!) gcc.dg/pch/save-temps-1.c -O0 -g -I. -Dwithout_PCH (test for excess errors) gcc.dg/pch/save-temps-1.c -O0 -g assembly comparison gcc.dg/pr61053.c (test for errors, line 70) gcc.dg/pr61053.c (test for errors, line 71) gcc.dg/pr61053.c (test for errors, line 72) gcc.dg/pr61053.c (test for errors, line 73) gcc.dg/pr61053.c (test for errors, line 74) ## Differences found: # 1 differences in5 common sum files found 5 result files are (which should be enough for us, I guess): ShengShiZhuChengdeMacBook-Pro:build-gcc sszc$ sudo find ./ | grep "\.sum$" .//gcc/testsuite/g++/g++.sum .//gcc/testsuite/gcc/gcc.sum .//gcc/testsuite/gfortran/gfortran.sum .//gcc/testsuite/objc/objc.sum .//x86_64-apple-darwin14.4.0/libstdc++-v3/testsuite/libstdc++.sum "make check" fails information (I guess, it should be easy to be fixed): /Applications/Xcode-2.app/Contents/Developer/usr/bin/make all-am true DO=all multi-do # /Applications/Xcode-2.app/Contents/Developer/usr/bin/make /Applications/Xcode-2.app/Contents/Developer/usr/bin/make btest stest /Users/sszc/Desktop/build-gcc/./gcc/xgcc -B/Users/sszc/Desktop/build-gcc/./gcc/ -B/usr/local/x86_64-apple-darwin14.4.0/bin/ -B/usr/local/x86_64-apple-darwin14.4.0/lib/ -isystem /usr/local/x86_64-apple-darwin14.4.0/include -isystem /usr/local/x86_64-apple-darwin14.4.0/sys-include-DHAVE_CONFIG_H -I. -I../../../gcc/libbacktrace -I ../../../gcc/libbacktrace/../include -I ../../../gcc/libbacktrace/../libgcc -I ../libgcc -funwind-tables -frandom-seed=btest-btest.o -W -Wall -Wwrite-strings -Wstrict-prototypes -Wmissing-prototypes -Wold-style-definition -Wmissing-format-attribute -Wcast-qual -Werror -g -O -g -O2 -c -o btest-btest.o `test -f 'btest.c' || echo '../../../gcc/libbacktrace/'`btest.c ../../../gcc/libbacktrace/btest.c:624:1: error: ‘test5’ defined but not used [-Werror=unused-function] test5 (void) ^ cc1: all warnings being treated as errors make[3]: *** [btest-btest.o] Error 1 make[2]: *** [check-am] Error 2 make[1]: *** [check-target-libbacktrace] Error 2 make: *** [do-check] Error 2
[Bug testsuite/69573] FAIL: gcc.dg/pr61053.c (test for excess errors)
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=69573 --- Comment #15 from Chen Gang --- (In reply to Martin Sebor from comment #9) > I built the x86_64-apple-darwin15.3.0 cross-compiler to better understand > what the problem is but I don't see it. The cross compiler says the size > and alignment of long double is 16 in both ILP32 (with -m32) and LP64. So > the patched test should pass without any further changes. > > Can you let me know the target triple of your GCC and the result of > _Alignof(long double)? Below is what I get: > I get the same result just like you have done. And my gcc information is: ShengShiZhuChengdeMacBook-Pro:ana sszc$ gcc -v Using built-in specs. COLLECT_GCC=gcc COLLECT_LTO_WRAPPER=/usr/local/libexec/gcc/x86_64-apple-darwin14.4.0/6.0.0/lto-wrapper Target: x86_64-apple-darwin14.4.0 Configured with: ../gcc/configure Thread model: posix gcc version 6.0.0 20160205 (experimental) (GCC) Thanks.
[Bug testsuite/69573] FAIL: gcc.dg/pr61053.c (test for excess errors)
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=69573 --- Comment #4 from Chen Gang --- (In reply to Chen Gang from comment #3) > Created attachment 37625 [details] > Under my Darwin mac book OS X Yosemite 10.10.4, it looks short wide alignas > for long wide type will cause issue. Oh, sorry, it is my misunderstanding. I shall try the "make check" for this patch under Darwin with gcc 6.0.0. Thanks.
[Bug testsuite/69573] FAIL: gcc.dg/pr61053.c (test for excess errors)
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=69573 --- Comment #5 from Chen Gang --- (In reply to Martin Sebor from comment #2) > Patch posted for review: > https://gcc.gnu.org/ml/gcc-patches/2016-01/msg02372.html I do not known why let __SIZEOF_LONG_DOUBLE__ == 12 ? I guess we need use __SIZEOF_LONG_DOUBLE__ != 4 instead of. Thanks.
[Bug testsuite/69573] FAIL: gcc.dg/pr61053.c (test for excess errors)
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=69573 --- Comment #6 from Chen Gang --- (In reply to Chen Gang from comment #5) > > I guess we need use __SIZEOF_LONG_DOUBLE__ != 4 instead of. > Oh, sorry again, the above is incorrect. Under my x86_64 Darwin, for m32, __SIZEOF_LONG_DOUBLE__ is 16. It looks that only use __SIZEOF_LONG_DOUBLE__ is not enough.
[Bug testsuite/69573] FAIL: gcc.dg/pr61053.c (test for excess errors)
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=69573 --- Comment #7 from Chen Gang --- Can we check __APPLE_CC__ instead of __SIZEOF_LONG_DOUBLE__ ?
[Bug testsuite/69573] FAIL: gcc.dg/pr61053.c (test for excess errors)
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=69573 --- Comment #3 from Chen Gang --- Created attachment 37625 --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=37625=edit Under my Darwin mac book OS X Yosemite 10.10.4, it looks short wide alignas for long wide type will cause issue. Under my Darwin mac book OS X Yosemite 10.10.4, it looks short wide alignas for long wide type will cause issue. Please check, thanks. And I shall continue, too.
[Bug testsuite/69573] FAIL: gcc.dg/pr61053.c (test for excess errors)
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=69573 --- Comment #1 from Martin Sebor --- Created attachment 37529 --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=37529=edit Proposed patch. The attached patch should cure the failing test on the two targets. It passes on x86_64-*-linux-gnu with both RUNTESTFLAGS='--target_board=unix/-m32/-m128bit-long-double dg.exp=pr61053.c' and: RUNTESTFLAGS='dg.exp=pr61053.c'
[Bug testsuite/69573] FAIL: gcc.dg/pr61053.c (test for excess errors)
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=69573 --- Comment #2 from Martin Sebor --- Patch posted for review: https://gcc.gnu.org/ml/gcc-patches/2016-01/msg02372.html