In the GCC testsuite, there's quite a number of tests (mostly in
gcc/testsuite/gcc.target/i386, but also on powerpc and x86_64) that
check if the host CPU supports some ISA extension at runtime and
currently just exit (0) if that support is missing, producing a PASS
result.

That's not only highly confusing, but completely against the spirit of
IEEE 1001.3.

Some of those tests (rather some *-check.h headers that do the actual
legwork of calling __cpuid or __builtin_cpu_supports) have provisions to
print either PASSED or SKIPPED depending on the outcome of that test,
but only in DEBUG mode.

It occured to me that it would be useful and reasonably simple to always
prints these (or similarly stilyzed) comments and evaluate those from
DejaGnu (respectively gcc-dg-prune).

While there's already support for this for the compile step of a test
(matching specific patterns and emitting e.g. ::unsupported::message
which are then converted into an UNSUPPORTED result), the execution step
only looks at the execution output to handle dg-output.

If one applied ${tool}-dg-prune to the execution output as well, it
should be relatively easy to achieve the desired results.

Comments/thoughts?

        Rainer

-- 
-----------------------------------------------------------------------------
Rainer Orth, Center for Biotechnology, Bielefeld University

Reply via email to