https://gcc.gnu.org/bugzilla/show_bug.cgi?id=70595
Bug ID: 70595 Summary: Cilk Plus testsuite needs massive cleanup Product: gcc Version: 6.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: testsuite Assignee: unassigned at gcc dot gnu.org Reporter: ro at gcc dot gnu.org Target Milestone: --- Prompted by the tentative patch to support SPARC in libcilkrts (PR target/68945), I looked into the current Cilk Plus testsuite and found tons of issues, way beyond what it takes to support a new target: * Every single execution test explicitly lists the targets to run on, often even twice (in the dg-do target selector and then again when adding -lcilkrts via dg-options). This is completely unmaintainable and should be replaced by a target selector. I'm using the current check_libcilkrts_available, renamed to cilkplus_runtime, for thta purpose. There's no need to add -lcilkrts at all; -fcilkplus already does this when linking. * Two tests (c-c++-common/cilk-plus/CK/pr63307.c and c-c++-common/cilk-plus/SE/ef_error3.c) are pure compile tests and don't need a target selector at all. * This only leaves us with c-c++-common/cilk-plus/SE/ef_error2.c, where the expected warning is x86-specific, thus the target selector needs to stay. With those changes and the cleaned-up sparc port, I could successfully run the cilk-plus testsuite on Solaris/SPARC, too. But there's more cleanup possible/necessary: * Two tests (c-c++-common/cilk-plus/AN/decl-ptr-colon.c and c-c++-common/cilk-plus/AN/vla.c) live in a common directory, but are restricted to target c. Unless someone can educate me otherwise, they simply should be moved to gcc.dg/cilk-plus, losing the target selector. * Every since testcase is compiled/linked with -fcilkplus, most (all?) of them specifying this explicitly via ad-options. This is plain silly and should be moved into the framework. * Many tests are run at several optimization levels. This cries for using the torture framework instead of doing it explicitly. There may be more, but that's what I've found so far. I'm attaching my current patch for reference, but this is clearly gcc-7 material. Rainer