Re: [testsuite] Add missing dg-require-effective-target alloca to gcc testsuite
On 04/27/2017 04:04 PM, Tom de Vries wrote: On 04/26/2017 01:57 PM, Jakub Jelinek wrote: I guess those should be decided case by case whether we want relative, absolute or saved line numbers. If the diagnostic is within the same function or code block as the stuff it is relative to, relative is fine, but if e.g. the messages are just at the end of file and there are unrelated functions in between, it is not a good idea I've written attached patches: - replace absolute linenrs in objc.dg,obj-c++.dg - replace absolute linenrs in gfortran.dg and tested them on x86_64 with -m64/-m32. OK for trunk? Thanks, - Tom 0001-Replace-absolute-linenrs-in-objc.dg-obj-c-.dg.patch Replace absolute linenrs in objc.dg,obj-c++.dg 2017-04-25 Tom de Vries* obj-c++.dg/bitfield-1.mm: Replace absolute linenrs. * obj-c++.dg/bitfield-4.mm: Same. * obj-c++.dg/bitfield-5.mm: Same. * obj-c++.dg/exceptions-3.mm: Same. * obj-c++.dg/exceptions-5.mm: Same. * obj-c++.dg/method-1.mm: Same. * obj-c++.dg/method-12.mm: Same. * obj-c++.dg/method-13.mm: Same. * obj-c++.dg/method-15.mm: Same. * obj-c++.dg/method-16.mm: Same. * obj-c++.dg/property/at-property-18.mm: Same. * obj-c++.dg/property/at-property-25.mm: Same. * obj-c++.dg/property/at-property-5.mm: Same. * obj-c++.dg/property/dynamic-2.mm: Same. * obj-c++.dg/property/property-neg-3.mm: Same. * obj-c++.dg/protocol-inheritance-1.mm: Same. * obj-c++.dg/protocol-inheritance-2.mm: Same. * obj-c++.dg/syntax-error-1.mm: Same. * obj-c++.dg/try-catch-13.mm: Same. * objc.dg/bitfield-4.m: Same. * objc.dg/class-1.m: Same. * objc.dg/method-11.m: Same. * objc.dg/method-6.m: Same. * objc.dg/method-7.m: Same. * objc.dg/method-9.m: Same. * objc.dg/missing-proto-3.m: Same. * objc.dg/naming-2.m: Same. * objc.dg/property/at-property-16.m: Same. * objc.dg/property/at-property-18.m: Same. * objc.dg/property/at-property-25.m: Same. * objc.dg/property/at-property-5.m: Same. * objc.dg/property/dynamic-2.m: Same. * objc.dg/property/property-neg-3.m: Same. * objc.dg/protocol-inheritance-1.m: Same. * objc.dg/protocol-inheritance-2.m: Same. OK. jeff
Re: [testsuite] Add missing dg-require-effective-target alloca to gcc testsuite
On 04/27/2017 10:43 AM, Tom de Vries wrote: On 04/26/2017 01:57 PM, Jakub Jelinek wrote: On Wed, Apr 26, 2017 at 01:48:03PM +0200, Tom de Vries wrote: [ reposting with patch removed, was too big for gcc-patches@ ] I see in various tests you've ended up with ... { target ... } . } I think it would be better to just use ... { target ... } } in that case, . is the default, and if target is *-*-*, also remove the { target ... }. I've written sed commands for both simplifications, untested patches attached. Tested the patches, fixed a bug in the script generating the first (replaced ' \. ' with ' \. \}' in search pattern). Added ChangeLog and committed. Thanks, - Tom [ Not reposting patches. The only changes to the previously posted patches are that the gcc/testsuite/gcc.dg/tree-ssa/builtin-sprintf-warn-{1,2}.c modifications are no longer there. ]
Re: [testsuite] Add missing dg-require-effective-target alloca to gcc testsuite
On 04/26/2017 01:57 PM, Jakub Jelinek wrote: I guess those should be decided case by case whether we want relative, absolute or saved line numbers. If the diagnostic is within the same function or code block as the stuff it is relative to, relative is fine, but if e.g. the messages are just at the end of file and there are unrelated functions in between, it is not a good idea I've written attached patches: - replace absolute linenrs in objc.dg,obj-c++.dg - replace absolute linenrs in gfortran.dg and tested them on x86_64 with -m64/-m32. OK for trunk? Thanks, - Tom Replace absolute linenrs in objc.dg,obj-c++.dg 2017-04-25 Tom de Vries* obj-c++.dg/bitfield-1.mm: Replace absolute linenrs. * obj-c++.dg/bitfield-4.mm: Same. * obj-c++.dg/bitfield-5.mm: Same. * obj-c++.dg/exceptions-3.mm: Same. * obj-c++.dg/exceptions-5.mm: Same. * obj-c++.dg/method-1.mm: Same. * obj-c++.dg/method-12.mm: Same. * obj-c++.dg/method-13.mm: Same. * obj-c++.dg/method-15.mm: Same. * obj-c++.dg/method-16.mm: Same. * obj-c++.dg/property/at-property-18.mm: Same. * obj-c++.dg/property/at-property-25.mm: Same. * obj-c++.dg/property/at-property-5.mm: Same. * obj-c++.dg/property/dynamic-2.mm: Same. * obj-c++.dg/property/property-neg-3.mm: Same. * obj-c++.dg/protocol-inheritance-1.mm: Same. * obj-c++.dg/protocol-inheritance-2.mm: Same. * obj-c++.dg/syntax-error-1.mm: Same. * obj-c++.dg/try-catch-13.mm: Same. * objc.dg/bitfield-4.m: Same. * objc.dg/class-1.m: Same. * objc.dg/method-11.m: Same. * objc.dg/method-6.m: Same. * objc.dg/method-7.m: Same. * objc.dg/method-9.m: Same. * objc.dg/missing-proto-3.m: Same. * objc.dg/naming-2.m: Same. * objc.dg/property/at-property-16.m: Same. * objc.dg/property/at-property-18.m: Same. * objc.dg/property/at-property-25.m: Same. * objc.dg/property/at-property-5.m: Same. * objc.dg/property/dynamic-2.m: Same. * objc.dg/property/property-neg-3.m: Same. * objc.dg/protocol-inheritance-1.m: Same. * objc.dg/protocol-inheritance-2.m: Same. --- gcc/testsuite/obj-c++.dg/bitfield-1.mm | 24 +++ gcc/testsuite/obj-c++.dg/bitfield-4.mm | 8 ++--- gcc/testsuite/obj-c++.dg/bitfield-5.mm | 12 gcc/testsuite/obj-c++.dg/exceptions-3.mm | 6 ++-- gcc/testsuite/obj-c++.dg/exceptions-5.mm | 6 ++-- gcc/testsuite/obj-c++.dg/method-1.mm | 7 +++-- gcc/testsuite/obj-c++.dg/method-12.mm | 8 ++--- gcc/testsuite/obj-c++.dg/method-13.mm | 8 ++--- gcc/testsuite/obj-c++.dg/method-15.mm | 16 +- gcc/testsuite/obj-c++.dg/method-16.mm | 16 +- .../obj-c++.dg/property/at-property-18.mm | 32 ++-- .../obj-c++.dg/property/at-property-25.mm | 11 --- gcc/testsuite/obj-c++.dg/property/at-property-5.mm | 4 +-- gcc/testsuite/obj-c++.dg/property/dynamic-2.mm | 4 +-- .../obj-c++.dg/property/property-neg-3.mm | 4 +-- gcc/testsuite/obj-c++.dg/protocol-inheritance-1.mm | 7 ++--- gcc/testsuite/obj-c++.dg/protocol-inheritance-2.mm | 14 - gcc/testsuite/obj-c++.dg/syntax-error-1.mm | 5 ++-- gcc/testsuite/obj-c++.dg/try-catch-13.mm | 8 ++--- gcc/testsuite/objc.dg/bitfield-4.m | 12 gcc/testsuite/objc.dg/class-1.m| 17 ++- gcc/testsuite/objc.dg/method-11.m | 16 +- gcc/testsuite/objc.dg/method-6.m | 8 ++--- gcc/testsuite/objc.dg/method-7.m | 8 ++--- gcc/testsuite/objc.dg/method-9.m | 16 +- gcc/testsuite/objc.dg/missing-proto-3.m| 7 ++--- gcc/testsuite/objc.dg/naming-2.m | 4 +-- gcc/testsuite/objc.dg/property/at-property-16.m| 34 +++--- gcc/testsuite/objc.dg/property/at-property-18.m| 32 ++-- gcc/testsuite/objc.dg/property/at-property-25.m| 11 --- gcc/testsuite/objc.dg/property/at-property-5.m | 4 +-- gcc/testsuite/objc.dg/property/dynamic-2.m | 4 +-- gcc/testsuite/objc.dg/property/property-neg-3.m| 4 +-- gcc/testsuite/objc.dg/protocol-inheritance-1.m | 7 ++--- gcc/testsuite/objc.dg/protocol-inheritance-2.m | 14 - 35 files changed, 196 insertions(+), 202 deletions(-) diff --git a/gcc/testsuite/obj-c++.dg/bitfield-1.mm b/gcc/testsuite/obj-c++.dg/bitfield-1.mm index 92aaae4..a637619 100644 --- a/gcc/testsuite/obj-c++.dg/bitfield-1.mm +++ b/gcc/testsuite/obj-c++.dg/bitfield-1.mm @@ -39,10 +39,10 @@ struct Base_0 { /* { dg-warning "padding struct size to alignment boundary" } */ signed e: 5; unsigned f: 4; enum Enum g: 3; -} +} /* { dg-line interface_Derived } */ @end -struct Derived_0 { +struct Derived_0 { /* { dg-line struct_Derived_0 } */ Class isa; unsigned a: 2; int b: 3; @@ -56,10 +56,10 @@ struct Derived_0 { @interface Leaf: Derived { @public
Re: [testsuite] Add missing dg-require-effective-target alloca to gcc testsuite
On 04/26/2017 01:57 PM, Jakub Jelinek wrote: On Wed, Apr 26, 2017 at 01:48:03PM +0200, Tom de Vries wrote: [ reposting with patch removed, was too big for gcc-patches@ ] I see in various tests you've ended up with ... { target ... } . } I think it would be better to just use ... { target ... } } in that case, . is the default, and if target is *-*-*, also remove the { target ... }. I've written sed commands for both simplifications, untested patches attached. [ I suppose we could drop an empty comment as the last argument as well. { ... "" }. ] Are there any spots where the relative line number is with too big bias (say .+10 or .-10 and more)? In the original patch, which rewrote all absolute line numbers, yes, it generated -62 ( and Mike commented on that here: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=80221#c6 ). In the committed patch, no. The greatest relative line number magnitude was 6. The script was limited to rewrite only dg directives with -1 .. +1 relative line number, and adjacent directives referring to the same line. Thanks, - Tom I guess those should be decided case by case whether we want relative, absolute or saved line numbers. If the diagnostic is within the same function or code block as the stuff it is relative to, relative is fine, but if e.g. the messages are just at the end of file and there are unrelated functions in between, it is not a good idea to use relative. Jakub Remove . relative line number from dg directives find $(find -type d -name testsuite) -type f \ | xargs sed -ri 's#(dg-(error|warning|message|bogus).*) \. #\1 #' --- .../c-c++-common/Wimplicit-fallthrough-6.c | 16 +- .../c-c++-common/Wimplicit-fallthrough-7.c | 8 ++--- gcc/testsuite/c-c++-common/cilk-plus/AN/pr61963.c | 2 +- .../c-c++-common/cilk-plus/CK/no_args_error.c | 2 +- gcc/testsuite/c-c++-common/pr2.c | 2 +- gcc/testsuite/c-c++-common/pr49706.c | 6 ++-- gcc/testsuite/g++.dg/ext/utf16-4.C | 2 +- gcc/testsuite/g++.dg/parse/error2.C| 2 +- gcc/testsuite/g++.dg/warn/Wtype-limits-Wextra.C| 4 +-- gcc/testsuite/g++.dg/warn/Wtype-limits.C | 4 +-- gcc/testsuite/g++.dg/warn/overflow-warn-1.C| 2 +- gcc/testsuite/g++.dg/warn/overflow-warn-3.C| 2 +- gcc/testsuite/gcc.dg/Wpointer-sign-Wall.c | 2 +- gcc/testsuite/gcc.dg/Wpointer-sign-pedantic.c | 2 +- gcc/testsuite/gcc.dg/Wtype-limits-Wextra.c | 4 +-- gcc/testsuite/gcc.dg/Wtype-limits.c| 4 +-- gcc/testsuite/gcc.dg/cpp/19990413-1.c | 2 +- gcc/testsuite/gcc.dg/dg-test-1.c | 4 +-- gcc/testsuite/gcc.dg/empty-source-2.c | 2 +- gcc/testsuite/gcc.dg/empty-source-3.c | 2 +- gcc/testsuite/gcc.dg/label-decl-2.c| 2 +- gcc/testsuite/gcc.dg/m-un-2.c | 2 +- .../gcc.dg/tree-ssa/builtin-sprintf-warn-1.c | 36 +++--- .../gcc.dg/tree-ssa/builtin-sprintf-warn-2.c | 2 +- gcc/testsuite/gcc.dg/uninit-pr19430-O0.c | 2 +- gcc/testsuite/gcc.dg/uninit-pr19430.c | 2 +- gcc/testsuite/gcc.dg/uninit-pr20644-O0.c | 4 +-- gcc/testsuite/gcc.dg/utf16-4.c | 2 +- gcc/testsuite/gfortran.dg/pr70006.f90 | 8 ++--- gcc/testsuite/obj-c++.dg/fsf-package-0.m | 2 +- 30 files changed, 68 insertions(+), 68 deletions(-) diff --git a/gcc/testsuite/c-c++-common/Wimplicit-fallthrough-6.c b/gcc/testsuite/c-c++-common/Wimplicit-fallthrough-6.c index 5b6ac30..32d5feb 100644 --- a/gcc/testsuite/c-c++-common/Wimplicit-fallthrough-6.c +++ b/gcc/testsuite/c-c++-common/Wimplicit-fallthrough-6.c @@ -117,11 +117,11 @@ L1: switch (i) { case 1: - { /* { dg-warning "statement may fall through" "" { target c } . } */ + { /* { dg-warning "statement may fall through" "" { target c } } */ int j = 0; bar (j); if (j == 8) - return; /* { dg-warning "statement may fall through" "" { target c++ } . } */ + return; /* { dg-warning "statement may fall through" "" { target c++ } } */ } case 2: bar (99); @@ -145,13 +145,13 @@ L1: switch (i) { case 1: - { /* { dg-warning "statement may fall through" "" { target c } . } */ + { /* { dg-warning "statement may fall through" "" { target c } } */ int j = 0; bar (j); if (j == 8) bar (1); else - return; /* { dg-warning "statement may fall through" "" { target c++ } . } */ + return; /* { dg-warning "statement may fall through" "" { target c++ } } */ } case 2: bar (99); @@ -175,13 +175,13 @@ L1: switch (i) { case 1: - { /* { dg-warning "statement may fall through" "" { target c } . } */ + { /* { dg-warning "statement may fall through" "" { target c } } */ int j = 0; bar (j); if (j == 8) bar (1); else -
Re: [testsuite] Add missing dg-require-effective-target alloca to gcc testsuite
On Wed, Apr 26, 2017 at 01:48:03PM +0200, Tom de Vries wrote: > [ reposting with patch removed, was too big for gcc-patches@ ] I see in various tests you've ended up with ... { target ... } . } I think it would be better to just use ... { target ... } } in that case, . is the default, and if target is *-*-*, also remove the { target ... }. Are there any spots where the relative line number is with too big bias (say .+10 or .-10 and more)? I guess those should be decided case by case whether we want relative, absolute or saved line numbers. If the diagnostic is within the same function or code block as the stuff it is relative to, relative is fine, but if e.g. the messages are just at the end of file and there are unrelated functions in between, it is not a good idea to use relative. Jakub
Re: [testsuite] Add missing dg-require-effective-target alloca to gcc testsuite
[ reposting with patch removed, was too big for gcc-patches@ ] On 04/26/2017 01:33 PM, Tom de Vries wrote: On 03/27/2017 03:11 PM, Tom de Vries wrote: On 24/03/17 18:13, Mike Stump wrote: On Mar 24, 2017, at 5:58 AM, Rainer Orthwrote: - { /* { dg-warning "statement may fall through" "" { target c } 23 } */ -int a[i]; /* { dg-warning "statement may fall through" "" { target c++ } 24 } */ + { /* { dg-warning "statement may fall through" "" { target c } 24 } */ +int a[i]; /* { dg-warning "statement may fall through" "" { target c++ } 25 } */ Any reason to not use relative line numbers? See testsuite/gcc.dg/dg-test-1.c for a template for how to do it. I think they should work and be better. Indeed, all line numbers should be relative, generally speaking. FYI, I've written a script to convert all tests to relative line numbers. See PR80221 - "Contrib script to rewrite testcase from absolute to relative line numbers" ( https://gcc.gnu.org/bugzilla/show_bug.cgi?id=80221 ). A more restrictive version of that script (posted at https://gcc.gnu.org/bugzilla/show_bug.cgi?id=80221#c13 ) rewrites a line from absolute to relative linenumber if: - the relative line number is '.-1', '.' or '.+1', or - it's adjacent to a line we will rewrite (with the line numbers being consecutive) Committed. Thanks, - Tom 0001-Use-relative-line-number-for-subsequent-dg-directives.patch Use relative line number for subsequent dg directives 2017-04-19 Tom de Vries PR testsuite/80221 * c-c++-common/Wimplicit-fallthrough-6.c: Use relative line number for subsequent dg directives. * c-c++-common/Wimplicit-fallthrough-7.c: Same. * c-c++-common/Wint-to-pointer-cast-3.c: Same. * c-c++-common/attr-fallthrough-2.c: Same. * c-c++-common/cilk-plus/AN/parser_errors2.c: Same. * c-c++-common/cilk-plus/AN/parser_errors3.c: Same. * c-c++-common/cilk-plus/AN/pr61191.c: Same. * c-c++-common/cilk-plus/AN/pr61963.c: Same. * c-c++-common/cilk-plus/AN/pr62008.c: Same. * c-c++-common/cilk-plus/AN/rank_mismatch.c: Same. * c-c++-common/cilk-plus/CK/cilk_for_errors.c: Same. * c-c++-common/cilk-plus/CK/errors.c: Same. * c-c++-common/cilk-plus/CK/no_args_error.c: Same. * c-c++-common/cilk-plus/PS/clauses1.c: Same. * c-c++-common/cilk-plus/SE/vlength_errors.c: Same. * c-c++-common/cpp/pr57580.c: Same. * c-c++-common/goacc/asyncwait-1.c: Same. * c-c++-common/goacc/cache-2.c: Same. * c-c++-common/goacc/declare-2.c: Same. * c-c++-common/goacc/deviceptr-1.c: Same. * c-c++-common/goacc/routine-5.c: Same. * c-c++-common/gomp/clauses-2.c: Same. * c-c++-common/gomp/ordered-3.c: Same. * c-c++-common/gomp/pr67501.c: Same. * c-c++-common/pr2.c: Same. * c-c++-common/pr43395.c: Same. * c-c++-common/pr49706.c: Same. * c-c++-common/pr77624-1.c: Same. * c-c++-common/pr77624-2.c: Same. * c-c++-common/raw-string-14.c: Same. * c-c++-common/raw-string-16.c: Same. * c-c++-common/raw-string-3.c: Same. * c-c++-common/raw-string-4.c: Same. * c-c++-common/raw-string-5.c: Same. * c-c++-common/raw-string-6.c: Same. * g++.dg/abi/mangle41.C: Same. * g++.dg/conversion/nullptr1.C: Same. * g++.dg/cpp0x/alias-decl-80296.C: Same. * g++.dg/cpp0x/auto27.C: Same. * g++.dg/cpp0x/constexpr-98.C: Same. * g++.dg/cpp0x/constexpr-diag2.C: Same. * g++.dg/cpp0x/diag2.C: Same. * g++.dg/cpp0x/lambda/lambda-syntax1.C: Same. * g++.dg/cpp0x/nullptr15.C: Same. * g++.dg/cpp0x/pr31431-2.C: Same. * g++.dg/cpp0x/pr31431.C: Same. * g++.dg/cpp0x/pr79118.C: Same. * g++.dg/cpp0x/static_assert3.C: Same. * g++.dg/cpp0x/temp_default2.C: Same. * g++.dg/cpp0x/trailing4.C: Same. * g++.dg/cpp0x/variadic-ex10.C: Same. * g++.dg/cpp0x/variadic-ex13.C: Same. * g++.dg/cpp0x/variadic-ex14.C: Same. * g++.dg/cpp0x/variadic-ex3.C: Same. * g++.dg/cpp0x/variadic-ex4.C: Same. * g++.dg/cpp0x/variadic59.C: Same. * g++.dg/cpp0x/vt-37737-2.C: Same. * g++.dg/cpp0x/vt-57397-1.C: Same. * g++.dg/cpp0x/vt-57397-2.C: Same. * g++.dg/cpp1z/constexpr-lambda8.C: Same. * g++.dg/cpp1z/gen-attrs1.C: Same. * g++.dg/diagnostic/pr71075.C: Same. * g++.dg/eh/goto2.C: Same. * g++.dg/eh/goto3.C: Same. * g++.dg/expr/bitfield4.C: Same. * g++.dg/expr/bitfield5.C: Same. * g++.dg/expr/bitfield6.C: Same. * g++.dg/expr/bool1.C: Same. * g++.dg/expr/bool3.C: Same. * g++.dg/expr/cond10.C: Same. * g++.dg/expr/cond11.C: Same. * g++.dg/expr/lval3.C: Same. * g++.dg/expr/lval4.C: Same.
Re: [testsuite] Add missing dg-require-effective-target alloca to gcc testsuite
On 28/03/17 10:23, Thomas Schwinge wrote: Hi! On Thu, 23 Mar 2017 16:46:19 +0100, Tom de Vrieswrote: I've run the gcc testsuite for target nvptx-none and ran into "test for excess errors" FAILs due to: ... sorry, unimplemented: target cannot support alloca. ... This patch marks those testcases as requiring alloca. I observed that this test case: --- gcc/testsuite/gcc.dg/torture/pr71881.c (revision 246278) +++ gcc/testsuite/gcc.dg/torture/pr71881.c (working copy) @@ -1,4 +1,5 @@ /* { dg-do compile } */ +/* { dg-require-effective-target alloca } */ /* { dg-additional-options "-g" } */ ... as well as this test case: --- gcc/testsuite/gcc.c-torture/compile/pr79413.c (revision 246278) +++ gcc/testsuite/gcc.c-torture/compile/pr79413.c (working copy) @@ -1,3 +1,4 @@ +/* { dg-require-effective-target alloca } */ /* PR c/79413 */ ... previously did PASS for anything but "-O0" (that is, any "alloca" usage got optimized away). Now changed as follows: [-FAIL:-]{+UNSUPPORTED:+} gcc.c-torture/compile/pr79413.c -O0 [-(test for excess errors)-] [-PASS:-]{+UNSUPPORTED:+} gcc.c-torture/compile/pr79413.c -O1 [-(test for excess errors)-] [-PASS:-]{+UNSUPPORTED:+} gcc.c-torture/compile/pr79413.c -O2 [-(test for excess errors)-] [-PASS:-]{+UNSUPPORTED:+} gcc.c-torture/compile/pr79413.c -O3 -g [-(test for excess errors)-] [-PASS:-]{+UNSUPPORTED:+} gcc.c-torture/compile/pr79413.c -Os [-(test for excess errors)-] [-FAIL:-]{+UNSUPPORTED:+} gcc.dg/torture/pr71881.c -O0 [-(test for excess errors)-] [-PASS:-]{+UNSUPPORTED:+} gcc.dg/torture/pr71881.c -O1 [-(test for excess errors)-] [-PASS:-]{+UNSUPPORTED:+} gcc.dg/torture/pr71881.c -O2 [-(test for excess errors)-] [-PASS:-]{+UNSUPPORTED:+} gcc.dg/torture/pr71881.c -O3 -fomit-frame-pointer -funroll-loops -fpeel-loops -ftracer -finline-functions [-(test for excess errors)-] [-PASS:-]{+UNSUPPORTED:+} gcc.dg/torture/pr71881.c -O3 -g [-(test for excess errors)-] [-PASS:-]{+UNSUPPORTED:+} gcc.dg/torture/pr71881.c -Os [-(test for excess errors)-] Would it be useful to XFAIL these for "-O0" only (along with a comment), so that we continue testing that any "alloca" usage gets optimized away? (Just an idea.) I'd say that makes sense for test-cases which have the purpose of testing whether alloca is optimized away at certain optimization levels, but not for random test cases. Thanks, - Tom
Re: [testsuite] Add missing dg-require-effective-target alloca to gcc testsuite
Hi! On Thu, 23 Mar 2017 16:46:19 +0100, Tom de Vrieswrote: > I've run the gcc testsuite for target nvptx-none and ran into "test for > excess errors" FAILs due to: > ... > sorry, unimplemented: target cannot support alloca. > ... > > This patch marks those testcases as requiring alloca. I observed that this test case: > --- gcc/testsuite/gcc.dg/torture/pr71881.c (revision 246278) > +++ gcc/testsuite/gcc.dg/torture/pr71881.c (working copy) > @@ -1,4 +1,5 @@ > /* { dg-do compile } */ > +/* { dg-require-effective-target alloca } */ > /* { dg-additional-options "-g" } */ ... as well as this test case: > --- gcc/testsuite/gcc.c-torture/compile/pr79413.c (revision 246278) > +++ gcc/testsuite/gcc.c-torture/compile/pr79413.c (working copy) > @@ -1,3 +1,4 @@ > +/* { dg-require-effective-target alloca } */ > /* PR c/79413 */ ... previously did PASS for anything but "-O0" (that is, any "alloca" usage got optimized away). Now changed as follows: [-FAIL:-]{+UNSUPPORTED:+} gcc.c-torture/compile/pr79413.c -O0 [-(test for excess errors)-] [-PASS:-]{+UNSUPPORTED:+} gcc.c-torture/compile/pr79413.c -O1 [-(test for excess errors)-] [-PASS:-]{+UNSUPPORTED:+} gcc.c-torture/compile/pr79413.c -O2 [-(test for excess errors)-] [-PASS:-]{+UNSUPPORTED:+} gcc.c-torture/compile/pr79413.c -O3 -g [-(test for excess errors)-] [-PASS:-]{+UNSUPPORTED:+} gcc.c-torture/compile/pr79413.c -Os [-(test for excess errors)-] [-FAIL:-]{+UNSUPPORTED:+} gcc.dg/torture/pr71881.c -O0 [-(test for excess errors)-] [-PASS:-]{+UNSUPPORTED:+} gcc.dg/torture/pr71881.c -O1 [-(test for excess errors)-] [-PASS:-]{+UNSUPPORTED:+} gcc.dg/torture/pr71881.c -O2 [-(test for excess errors)-] [-PASS:-]{+UNSUPPORTED:+} gcc.dg/torture/pr71881.c -O3 -fomit-frame-pointer -funroll-loops -fpeel-loops -ftracer -finline-functions [-(test for excess errors)-] [-PASS:-]{+UNSUPPORTED:+} gcc.dg/torture/pr71881.c -O3 -g [-(test for excess errors)-] [-PASS:-]{+UNSUPPORTED:+} gcc.dg/torture/pr71881.c -Os [-(test for excess errors)-] Would it be useful to XFAIL these for "-O0" only (along with a comment), so that we continue testing that any "alloca" usage gets optimized away? (Just an idea.) Grüße Thomas
Re: [testsuite] Add missing dg-require-effective-target alloca to gcc testsuite
On 24/03/17 18:13, Mike Stump wrote: On Mar 24, 2017, at 5:58 AM, Rainer Orthwrote: - { /* { dg-warning "statement may fall through" "" { target c } 23 } */ - int a[i]; /* { dg-warning "statement may fall through" "" { target c++ } 24 } */ + { /* { dg-warning "statement may fall through" "" { target c } 24 } */ + int a[i]; /* { dg-warning "statement may fall through" "" { target c++ } 25 } */ Any reason to not use relative line numbers? See testsuite/gcc.dg/dg-test-1.c for a template for how to do it. I think they should work and be better. Indeed, all line numbers should be relative, generally speaking. FYI, I've written a script to convert all tests to relative line numbers. See PR80221 - "Contrib script to rewrite testcase from absolute to relative line numbers" ( https://gcc.gnu.org/bugzilla/show_bug.cgi?id=80221 ). Thanks, - Tom
Re: [testsuite] Add missing dg-require-effective-target alloca to gcc testsuite
On 24/03/17 13:38, Rainer Orth wrote: Hi Tom, On 23/03/17 18:25, Mike Stump wrote: On Mar 23, 2017, at 8:46 AM, Tom de Vrieswrote: I've run the gcc testsuite for target nvptx-none and ran into "test for excess errors" FAILs due to: ... sorry, unimplemented: target cannot support alloca. We'd encourage ports to support alloca. :-) OK for trunk for stage1? Ok. Ok for release branches and trunk as well, if you want. I'd recommend trunk, if your port is meant to work and test out nicely in gcc 7. Committed to trunk. seems you didn't properly test this patchset. Sorry, indeed I just tested the non-alloca target, but forgot the alloca target. Thanks for cleaning up the mess. - Tom
Re: [testsuite] Add missing dg-require-effective-target alloca to gcc testsuite
On Mar 24, 2017, at 5:58 AM, Rainer Orthwrote: > - { /* { dg-warning "statement may fall through" "" { target c } 23 } */ > - int a[i]; /* { dg-warning "statement may fall through" "" { target c++ > } 24 } */ > + { /* { dg-warning "statement may fall through" "" { target c } 24 } */ > + int a[i]; /* { dg-warning "statement may fall through" "" { target c++ > } 25 } */ Any reason to not use relative line numbers? See testsuite/gcc.dg/dg-test-1.c for a template for how to do it. I think they should work and be better. Indeed, all line numbers should be relative, generally speaking.
Re: [testsuite] Add missing dg-require-effective-target alloca to gcc testsuite
Hi Richard, >> Similar >> >> -m64 >> FAIL: gcc.dg/Walloca-2.c note (test for warnings, line 38) >> FAIL: gcc.dg/Wvla-larger-than-2.c note (test for warnings, line 25) >> >> -m32 >> FAIL: gcc.dg/Walloca-1.c (test for warnings, line 26) >> FAIL: gcc.dg/Walloca-1.c (test for excess errors) >> FAIL: gcc.dg/Walloca-2.c (test for warnings, line 38) >> FAIL: gcc.dg/Walloca-2.c (test for excess errors) >> FAIL: gcc.dg/Wvla-larger-than-2.c note (test for warnings, line 25) > > right, just noticed that myself. Fix in progress... here's what I committed after similar testing. Rainer -- - Rainer Orth, Center for Biotechnology, Bielefeld University 2017-03-24 Rainer Orth* c-c++-common/Wimplicit-fallthrough-7.c: Adjust dg-warning etc. line numbers. * gcc.dg/Walloca-1.c: Likewise. * gcc.dg/Walloca-2.c: Likewise. * gcc.dg/Wvla-larger-than-2.c: Likewise. # HG changeset patch # Parent 288df338f490e514591c89d11734d7de56f62460 Adjust c-c++-common/Wimplicit-fallthrough-7.c line numbers diff --git a/gcc/testsuite/c-c++-common/Wimplicit-fallthrough-7.c b/gcc/testsuite/c-c++-common/Wimplicit-fallthrough-7.c --- a/gcc/testsuite/c-c++-common/Wimplicit-fallthrough-7.c +++ b/gcc/testsuite/c-c++-common/Wimplicit-fallthrough-7.c @@ -21,8 +21,8 @@ f (int i) switch (i) { case 1: - { /* { dg-warning "statement may fall through" "" { target c } 23 } */ - int a[i]; /* { dg-warning "statement may fall through" "" { target c++ } 24 } */ + { /* { dg-warning "statement may fall through" "" { target c } 24 } */ + int a[i]; /* { dg-warning "statement may fall through" "" { target c++ } 25 } */ } case 2: bar (99); @@ -31,8 +31,8 @@ f (int i) switch (i) { case 1: - for (int j = 0; j < 10; j++) /* { dg-warning "statement may fall through" "" { target c } 33 } */ - map[j] = j; /* { dg-warning "statement may fall through" "" { target c++ } 34 } */ + for (int j = 0; j < 10; j++) /* { dg-warning "statement may fall through" "" { target c } 34 } */ + map[j] = j; /* { dg-warning "statement may fall through" "" { target c++ } 35 } */ case 2: bar (99); } diff --git a/gcc/testsuite/gcc.dg/Walloca-1.c b/gcc/testsuite/gcc.dg/Walloca-1.c --- a/gcc/testsuite/gcc.dg/Walloca-1.c +++ b/gcc/testsuite/gcc.dg/Walloca-1.c @@ -25,7 +25,7 @@ void foo1 (size_t len, size_t len2, size useit (s); // OK, constant argument to alloca s = alloca (num); // { dg-warning "large due to conversion" "" { target lp64 } } - // { dg-warning "unbounded use of 'alloca'" "" { target { ! lp64 } } 26 } + // { dg-warning "unbounded use of 'alloca'" "" { target { ! lp64 } } 27 } useit (s); s = alloca (3); /* { dg-warning "is too large" } */ diff --git a/gcc/testsuite/gcc.dg/Walloca-2.c b/gcc/testsuite/gcc.dg/Walloca-2.c --- a/gcc/testsuite/gcc.dg/Walloca-2.c +++ b/gcc/testsuite/gcc.dg/Walloca-2.c @@ -37,8 +37,8 @@ g3 (int n) if (n > 0 && n < 3000) { p = __builtin_alloca (n); // { dg-warning "'alloca' may be too large" "" { target lp64} } - // { dg-message "note:.*argument may be as large as 2999" "note" { target lp64 } 38 } - // { dg-warning "unbounded use of 'alloca'" "" { target { ! lp64 } } 38 } + // { dg-message "note:.*argument may be as large as 2999" "note" { target lp64 } 39 } + // { dg-warning "unbounded use of 'alloca'" "" { target { ! lp64 } } 39 } } else p = __builtin_malloc (n); diff --git a/gcc/testsuite/gcc.dg/Wvla-larger-than-2.c b/gcc/testsuite/gcc.dg/Wvla-larger-than-2.c --- a/gcc/testsuite/gcc.dg/Wvla-larger-than-2.c +++ b/gcc/testsuite/gcc.dg/Wvla-larger-than-2.c @@ -24,7 +24,7 @@ f2 (__SIZE_TYPE__ a) { // 11 * 4 bytes = 44: Not OK. uint32_t x[a]; // { dg-warning "array may be too large" } - // { dg-message "note:.*argument may be as large as 44" "note" { target *-*-* } 25 } + // { dg-message "note:.*argument may be as large as 44" "note" { target *-*-* } 26 } f0 (x); } }
Re: [testsuite] Add missing dg-require-effective-target alloca to gcc testsuite
Hi Richard, > Similar > > -m64 > FAIL: gcc.dg/Walloca-2.c note (test for warnings, line 38) > FAIL: gcc.dg/Wvla-larger-than-2.c note (test for warnings, line 25) > > -m32 > FAIL: gcc.dg/Walloca-1.c (test for warnings, line 26) > FAIL: gcc.dg/Walloca-1.c (test for excess errors) > FAIL: gcc.dg/Walloca-2.c (test for warnings, line 38) > FAIL: gcc.dg/Walloca-2.c (test for excess errors) > FAIL: gcc.dg/Wvla-larger-than-2.c note (test for warnings, line 25) right, just noticed that myself. Fix in progress... Rainer -- - Rainer Orth, Center for Biotechnology, Bielefeld University
Re: [testsuite] Add missing dg-require-effective-target alloca to gcc testsuite
On Fri, Mar 24, 2017 at 1:38 PM, Rainer Orthwrote: > Hi Tom, > >> On 23/03/17 18:25, Mike Stump wrote: >>> On Mar 23, 2017, at 8:46 AM, Tom de Vries wrote: I've run the gcc testsuite for target nvptx-none and ran into "test for excess errors" FAILs due to: ... sorry, unimplemented: target cannot support alloca. >>> >>> We'd encourage ports to support alloca. :-) >>> OK for trunk for stage1? >>> >>> Ok. Ok for release branches and trunk as well, if you want. I'd >>> recommend trunk, if your port is meant to work and test out nicely in gcc >>> 7. >>> >> >> Committed to trunk. > > seems you didn't properly test this patchset. It caused > > +FAIL: c-c++-common/Wimplicit-fallthrough-7.c -std=gnu++11 (test for > warnings, > line 24) > +FAIL: c-c++-common/Wimplicit-fallthrough-7.c -std=gnu++11 (test for > warnings, > line 34) > +FAIL: c-c++-common/Wimplicit-fallthrough-7.c -std=gnu++11 (test for excess > err > ors) > +FAIL: c-c++-common/Wimplicit-fallthrough-7.c -std=gnu++14 (test for > warnings, > line 24) > +FAIL: c-c++-common/Wimplicit-fallthrough-7.c -std=gnu++14 (test for > warnings, > line 34) > +FAIL: c-c++-common/Wimplicit-fallthrough-7.c -std=gnu++14 (test for excess > err > ors) > +FAIL: c-c++-common/Wimplicit-fallthrough-7.c -std=gnu++98 (test for > warnings, > line 24) > +FAIL: c-c++-common/Wimplicit-fallthrough-7.c -std=gnu++98 (test for > warnings, > line 34) > +FAIL: c-c++-common/Wimplicit-fallthrough-7.c -std=gnu++98 (test for excess > err > ors) > > everywhere. Adding that dg-require-effective-target line requires > adjusting dg-warning etc. line numbers. > > Fixed as follows, installed on mainline after checking with the > appropriate runtest invocations (for c and c++) on x86_64-pc-linux-gnu. Similar -m64 FAIL: gcc.dg/Walloca-2.c note (test for warnings, line 38) FAIL: gcc.dg/Wvla-larger-than-2.c note (test for warnings, line 25) -m32 FAIL: gcc.dg/Walloca-1.c (test for warnings, line 26) FAIL: gcc.dg/Walloca-1.c (test for excess errors) FAIL: gcc.dg/Walloca-2.c (test for warnings, line 38) FAIL: gcc.dg/Walloca-2.c (test for excess errors) FAIL: gcc.dg/Wvla-larger-than-2.c note (test for warnings, line 25) > Rainer > > -- > - > Rainer Orth, Center for Biotechnology, Bielefeld University > > > 2017-03-24 Rainer Orth > > * c-c++-common/Wimplicit-fallthrough-7.c: Adjust dg-warning line > numbers. >
Re: [testsuite] Add missing dg-require-effective-target alloca to gcc testsuite
Hi Tom, > On 23/03/17 18:25, Mike Stump wrote: >> On Mar 23, 2017, at 8:46 AM, Tom de Vrieswrote: >>> >>> I've run the gcc testsuite for target nvptx-none and ran into "test for >>> excess errors" FAILs due to: >>> ... >>> sorry, unimplemented: target cannot support alloca. >> >> We'd encourage ports to support alloca. :-) >> >>> OK for trunk for stage1? >> >> Ok. Ok for release branches and trunk as well, if you want. I'd >> recommend trunk, if your port is meant to work and test out nicely in gcc >> 7. >> > > Committed to trunk. seems you didn't properly test this patchset. It caused +FAIL: c-c++-common/Wimplicit-fallthrough-7.c -std=gnu++11 (test for warnings, line 24) +FAIL: c-c++-common/Wimplicit-fallthrough-7.c -std=gnu++11 (test for warnings, line 34) +FAIL: c-c++-common/Wimplicit-fallthrough-7.c -std=gnu++11 (test for excess err ors) +FAIL: c-c++-common/Wimplicit-fallthrough-7.c -std=gnu++14 (test for warnings, line 24) +FAIL: c-c++-common/Wimplicit-fallthrough-7.c -std=gnu++14 (test for warnings, line 34) +FAIL: c-c++-common/Wimplicit-fallthrough-7.c -std=gnu++14 (test for excess err ors) +FAIL: c-c++-common/Wimplicit-fallthrough-7.c -std=gnu++98 (test for warnings, line 24) +FAIL: c-c++-common/Wimplicit-fallthrough-7.c -std=gnu++98 (test for warnings, line 34) +FAIL: c-c++-common/Wimplicit-fallthrough-7.c -std=gnu++98 (test for excess err ors) everywhere. Adding that dg-require-effective-target line requires adjusting dg-warning etc. line numbers. Fixed as follows, installed on mainline after checking with the appropriate runtest invocations (for c and c++) on x86_64-pc-linux-gnu. Rainer -- - Rainer Orth, Center for Biotechnology, Bielefeld University 2017-03-24 Rainer Orth * c-c++-common/Wimplicit-fallthrough-7.c: Adjust dg-warning line numbers. # HG changeset patch # Parent 288df338f490e514591c89d11734d7de56f62460 Adjust c-c++-common/Wimplicit-fallthrough-7.c line numbers diff --git a/gcc/testsuite/c-c++-common/Wimplicit-fallthrough-7.c b/gcc/testsuite/c-c++-common/Wimplicit-fallthrough-7.c --- a/gcc/testsuite/c-c++-common/Wimplicit-fallthrough-7.c +++ b/gcc/testsuite/c-c++-common/Wimplicit-fallthrough-7.c @@ -21,8 +21,8 @@ f (int i) switch (i) { case 1: - { /* { dg-warning "statement may fall through" "" { target c } 23 } */ - int a[i]; /* { dg-warning "statement may fall through" "" { target c++ } 24 } */ + { /* { dg-warning "statement may fall through" "" { target c } 24 } */ + int a[i]; /* { dg-warning "statement may fall through" "" { target c++ } 25 } */ } case 2: bar (99); @@ -31,8 +31,8 @@ f (int i) switch (i) { case 1: - for (int j = 0; j < 10; j++) /* { dg-warning "statement may fall through" "" { target c } 33 } */ - map[j] = j; /* { dg-warning "statement may fall through" "" { target c++ } 34 } */ + for (int j = 0; j < 10; j++) /* { dg-warning "statement may fall through" "" { target c } 34 } */ + map[j] = j; /* { dg-warning "statement may fall through" "" { target c++ } 35 } */ case 2: bar (99); }
Re: [testsuite] Add missing dg-require-effective-target alloca to gcc testsuite
On 23/03/17 18:25, Mike Stump wrote: On Mar 23, 2017, at 8:46 AM, Tom de Vrieswrote: I've run the gcc testsuite for target nvptx-none and ran into "test for excess errors" FAILs due to: ... sorry, unimplemented: target cannot support alloca. We'd encourage ports to support alloca. :-) OK for trunk for stage1? Ok. Ok for release branches and trunk as well, if you want. I'd recommend trunk, if your port is meant to work and test out nicely in gcc 7. Committed to trunk. Likewise, committed these 3 patches for effective target keywords nonlocal_goto, indirect_jump and global_constructor. Thanks, - Tom Require effective target nonlocal_goto in pr79244.c 2017-03-23 Tom de Vries PR testsuite/80092 * gcc.dg/torture/pr79244.c: Add dg-require-effective-target nonlocal_goto. --- gcc/testsuite/gcc.dg/torture/pr79244.c | 1 + 1 file changed, 1 insertion(+) diff --git a/gcc/testsuite/gcc.dg/torture/pr79244.c b/gcc/testsuite/gcc.dg/torture/pr79244.c index 05143cd..3f983c0 100644 --- a/gcc/testsuite/gcc.dg/torture/pr79244.c +++ b/gcc/testsuite/gcc.dg/torture/pr79244.c @@ -1,4 +1,5 @@ /* { dg-do compile } */ +/* { dg-require-effective-target nonlocal_goto } */ long buf[5]; int bar (void); Require effective target indirect_jump in Wimplicit-fallthrough-34.c 2017-03-23 Tom de Vries PR testsuite/80092 * c-c++-common/Wimplicit-fallthrough-34.c: Add dg-require-effective-target indirect_jumps. --- gcc/testsuite/c-c++-common/Wimplicit-fallthrough-34.c | 1 + 1 file changed, 1 insertion(+) diff --git a/gcc/testsuite/c-c++-common/Wimplicit-fallthrough-34.c b/gcc/testsuite/c-c++-common/Wimplicit-fallthrough-34.c index 9168c52..e0b5350 100644 --- a/gcc/testsuite/c-c++-common/Wimplicit-fallthrough-34.c +++ b/gcc/testsuite/c-c++-common/Wimplicit-fallthrough-34.c @@ -1,5 +1,6 @@ /* PR c/77946 */ /* { dg-do compile } */ +/* { dg-require-effective-target indirect_jumps } */ /* { dg-options "-Wimplicit-fallthrough" } */ void Require effective target global_constructor for two testcases 2017-03-23 Tom de Vries PR testsuite/80092 * gcc.dg/no_profile_instrument_function-attr-1.c: Add dg-require-effective-target global_constructor. * gcc.dg/tls/emutls-2.c: Same. --- gcc/testsuite/gcc.dg/no_profile_instrument_function-attr-1.c | 1 + gcc/testsuite/gcc.dg/tls/emutls-2.c | 1 + 2 files changed, 2 insertions(+) diff --git a/gcc/testsuite/gcc.dg/no_profile_instrument_function-attr-1.c b/gcc/testsuite/gcc.dg/no_profile_instrument_function-attr-1.c index f7afb34..0f04fb1 100644 --- a/gcc/testsuite/gcc.dg/no_profile_instrument_function-attr-1.c +++ b/gcc/testsuite/gcc.dg/no_profile_instrument_function-attr-1.c @@ -1,3 +1,4 @@ +/* { dg-require-effective-target global_constructor } */ /* { dg-options "-O2 -fprofile-generate -fprofile-update=single -fdump-tree-optimized" } */ __attribute__ ((no_profile_instrument_function)) diff --git a/gcc/testsuite/gcc.dg/tls/emutls-2.c b/gcc/testsuite/gcc.dg/tls/emutls-2.c index 1e26d5f..3b94dc7 100644 --- a/gcc/testsuite/gcc.dg/tls/emutls-2.c +++ b/gcc/testsuite/gcc.dg/tls/emutls-2.c @@ -1,5 +1,6 @@ /* { dg-do compile } */ /* { dg-require-effective-target tls } */ +/* { dg-require-effective-target global_constructor } */ /* { dg-options "-O2" } */ /* With emulated TLS, the constructor generated during IPA
Re: [testsuite] Add missing dg-require-effective-target alloca to gcc testsuite
On Mar 23, 2017, at 8:46 AM, Tom de Vrieswrote: > > I've run the gcc testsuite for target nvptx-none and ran into "test for > excess errors" FAILs due to: > ... > sorry, unimplemented: target cannot support alloca. We'd encourage ports to support alloca. :-) > OK for trunk for stage1? Ok. Ok for release branches and trunk as well, if you want. I'd recommend trunk, if your port is meant to work and test out nicely in gcc 7.
Re: [testsuite] Add missing dg-require-effective-target alloca to gcc testsuite
On 23/03/17 17:24, Thomas Schwinge wrote: Hi Tom! On Thu, 23 Mar 2017 16:46:19 +0100, Tom de Vrieswrote: I've run the gcc testsuite for target nvptx-none and ran into "test for excess errors" FAILs due to: ... sorry, unimplemented: target cannot support alloca. ... This patch marks those testcases as requiring alloca. Thanks! OK for trunk for stage1? Wouldn't this be good "as obvious" for trunk, right now? (Or are there any potential worries?) I suppose you're right we could classify this as obvious. I'm not sure about "right now" though, given that we're in stage4 and this is neither a regression fix nor a documentation fix. Thanks, - Tom
Re: [testsuite] Add missing dg-require-effective-target alloca to gcc testsuite
Hi Tom! On Thu, 23 Mar 2017 16:46:19 +0100, Tom de Vrieswrote: > I've run the gcc testsuite for target nvptx-none and ran into "test for > excess errors" FAILs due to: > ... > sorry, unimplemented: target cannot support alloca. > ... > > This patch marks those testcases as requiring alloca. Thanks! > OK for trunk for stage1? Wouldn't this be good "as obvious" for trunk, right now? (Or are there any potential worries?) > 2017-03-23 Tom de Vries "PR testsuite/80092", I suppose? > * gcc.dg/Walloca-7.c: Add dg-require-effective-target alloca. > * gcc.dg/Walloca-12.c: Same. > * gcc.dg/attr-alloc_size-8.c: Same. > * gcc.dg/Walloca-4.c: Same. > * gcc.dg/Walloca-8.c: Same. > * gcc.dg/Walloca-13.c: Same. > * gcc.dg/attr-alloc_size-9.c: Same. > * gcc.dg/Walloca-1.c: Same. > * gcc.dg/tree-ssa/builtin-sprintf-warn-3.c: Same. > * gcc.dg/Walloca-5.c: Same. > * gcc.dg/Walloca-10.c: Same. > * gcc.dg/Walloca-9.c: Same. > * gcc.dg/attr-alloc_size-6.c: Same. > * gcc.dg/Wvla-larger-than-1.c: Same. > * gcc.dg/torture/pr71881.c: Same. > * gcc.dg/torture/pr71901.c: Same. > * gcc.dg/torture/pr78742.c: Same. > * gcc.dg/builtin-alloc-size.c: Same. > * gcc.dg/Walloca-2.c: Same. > * gcc.dg/Walloca-6.c: Same. > * gcc.dg/Walloca-11.c: Same. > * gcc.dg/attr-alloc_size-7.c: Same. > * gcc.dg/Wvla-larger-than-2.c: Same. > * gcc.dg/Walloca-3.c: Same. > * c-c++-common/Wimplicit-fallthrough-7.c: Same. > * gcc.c-torture/compile/pr79413.c: Same. > * gcc.c-torture/compile/pr78439.c: Same. Grüße Thomas
[testsuite] Add missing dg-require-effective-target alloca to gcc testsuite
Hi, I've run the gcc testsuite for target nvptx-none and ran into "test for excess errors" FAILs due to: ... sorry, unimplemented: target cannot support alloca. ... This patch marks those testcases as requiring alloca. OK for trunk for stage1? Thanks, - Tom 2017-03-23 Tom de Vries* gcc.dg/Walloca-7.c: Add dg-require-effective-target alloca. * gcc.dg/Walloca-12.c: Same. * gcc.dg/attr-alloc_size-8.c: Same. * gcc.dg/Walloca-4.c: Same. * gcc.dg/Walloca-8.c: Same. * gcc.dg/Walloca-13.c: Same. * gcc.dg/attr-alloc_size-9.c: Same. * gcc.dg/Walloca-1.c: Same. * gcc.dg/tree-ssa/builtin-sprintf-warn-3.c: Same. * gcc.dg/Walloca-5.c: Same. * gcc.dg/Walloca-10.c: Same. * gcc.dg/Walloca-9.c: Same. * gcc.dg/attr-alloc_size-6.c: Same. * gcc.dg/Wvla-larger-than-1.c: Same. * gcc.dg/torture/pr71881.c: Same. * gcc.dg/torture/pr71901.c: Same. * gcc.dg/torture/pr78742.c: Same. * gcc.dg/builtin-alloc-size.c: Same. * gcc.dg/Walloca-2.c: Same. * gcc.dg/Walloca-6.c: Same. * gcc.dg/Walloca-11.c: Same. * gcc.dg/attr-alloc_size-7.c: Same. * gcc.dg/Wvla-larger-than-2.c: Same. * gcc.dg/Walloca-3.c: Same. * c-c++-common/Wimplicit-fallthrough-7.c: Same. * gcc.c-torture/compile/pr79413.c: Same. * gcc.c-torture/compile/pr78439.c: Same. Index: gcc/testsuite/gcc.dg/Walloca-7.c === --- gcc/testsuite/gcc.dg/Walloca-7.c (revision 246278) +++ gcc/testsuite/gcc.dg/Walloca-7.c (working copy) @@ -1,4 +1,5 @@ /* { dg-do compile } */ +/* { dg-require-effective-target alloca } */ /* { dg-options "-Walloca -O0" } */ extern void f(void *); Index: gcc/testsuite/gcc.dg/Walloca-12.c === --- gcc/testsuite/gcc.dg/Walloca-12.c (revision 246278) +++ gcc/testsuite/gcc.dg/Walloca-12.c (working copy) @@ -1,4 +1,5 @@ /* { dg-do compile } */ +/* { dg-require-effective-target alloca } */ /* { dg-options "-Walloca-larger-than=128 -O2" } */ void f (void*); Index: gcc/testsuite/gcc.dg/attr-alloc_size-8.c === --- gcc/testsuite/gcc.dg/attr-alloc_size-8.c (revision 246278) +++ gcc/testsuite/gcc.dg/attr-alloc_size-8.c (working copy) @@ -3,6 +3,7 @@ -Wvla-larger-than, and -Walloc-size-larger-than options. The former two more specific options override the more general latter option. */ /* { dg-do compile } */ +/* { dg-require-effective-target alloca } */ /* { dg-options "-O2 -Walloc-size-larger-than=123 -Walloca-larger-than=234 -Wvla-larger-than=345" } */ #define SIZE_MAX __SIZE_MAX__ Index: gcc/testsuite/gcc.dg/Walloca-4.c === --- gcc/testsuite/gcc.dg/Walloca-4.c (revision 246278) +++ gcc/testsuite/gcc.dg/Walloca-4.c (working copy) @@ -1,4 +1,5 @@ /* { dg-do compile } */ +/* { dg-require-effective-target alloca } */ /* { dg-options "-Walloca-larger-than=5000 -O2" } */ char * Index: gcc/testsuite/gcc.dg/Walloca-8.c === --- gcc/testsuite/gcc.dg/Walloca-8.c (revision 246278) +++ gcc/testsuite/gcc.dg/Walloca-8.c (working copy) @@ -1,4 +1,5 @@ /* { dg-do compile } */ +/* { dg-require-effective-target alloca } */ /* { dg-options "-Walloca-larger-than=2000 -O2" } */ void *p; Index: gcc/testsuite/gcc.dg/Walloca-13.c === --- gcc/testsuite/gcc.dg/Walloca-13.c (revision 246278) +++ gcc/testsuite/gcc.dg/Walloca-13.c (working copy) @@ -1,4 +1,5 @@ /* { dg-do compile } */ +/* { dg-require-effective-target alloca } */ /* { dg-options "-Walloca-larger-than=100 -O2" } */ void f (void*); Index: gcc/testsuite/gcc.dg/attr-alloc_size-9.c === --- gcc/testsuite/gcc.dg/attr-alloc_size-9.c (revision 246278) +++ gcc/testsuite/gcc.dg/attr-alloc_size-9.c (working copy) @@ -3,6 +3,7 @@ with attribute malloc. This means that the pointer they return can be assumed not to alias any other valid pointer. */ /* { dg-do compile } */ +/* { dg-require-effective-target alloca } */ /* { dg-options "-O2 -fdump-tree-optimized" } */ void sink (void*); Index: gcc/testsuite/gcc.dg/Walloca-1.c === --- gcc/testsuite/gcc.dg/Walloca-1.c (revision 246278) +++ gcc/testsuite/gcc.dg/Walloca-1.c (working copy) @@ -1,4 +1,5 @@ /* { dg-do compile } */ +/* { dg-require-effective-target alloca } */ /* { dg-options "-Walloca-larger-than=2000 -O2" } */ #define alloca __builtin_alloca Index: gcc/testsuite/gcc.dg/tree-ssa/builtin-sprintf-warn-3.c === --- gcc/testsuite/gcc.dg/tree-ssa/builtin-sprintf-warn-3.c (revision 246278) +++ gcc/testsuite/gcc.dg/tree-ssa/builtin-sprintf-warn-3.c (working copy) @@ -4,6 +4,7 @@ -O2 (-ftree-vrp) is necessary