From: Jeff Law <law@redhat.com>
To: David Malcolm <dmalcolm@redhat.com>, gcc-patches@gcc.gnu.org
Subject: Re: [PATCH 1/2] Support C++-specific selftests
Date: Fri, 30 Jun 2017 15:57:00 -0000 [thread overview]
Message-ID: <27ddeda0-6dd6-a28e-c372-56051eec8cee@redhat.com> (raw)
In-Reply-To: <1498177241-34129-1-git-send-email-dmalcolm@redhat.com>
On 06/22/2017 06:20 PM, David Malcolm wrote:
> Currently the "make selftest" target run during each stage of the
> build just runs the selftests within cc1.
>
> As part of the fix for PR c++/81167 I want to be able to write
> C++-specific selftests (to exercise the C++ implementation of
> the pp's format_decoder).
>
> Hence this patch generalizes the existing selftest logic in
> Makefile.in so that selftests are run for both cc1 and cc1plus.
> It also adds convenience methods for running them under
> gdb and under valgrind.
>
> It also reorganizes the existing lang-specific selftests, splitting
> them into ones shared by c-family, and those that are specific
> to individual members of the c family. There aren't any of the
> latter yet, but the followup adds some for C++.
>
> Successfully bootstrapped & regrtested on x86_64-pc-linux-gnu in
> combination with the followup patch; the number of reported passes
> from -fself-test for cc1 at each stage was unaffected by the kit:
> -fself-test: 39233 pass(es),
> and cc1plus gained a similar line of output.
>
> OK for trunk?
>
> gcc/ChangeLog:
> * Makefile.in (SELFTEST_FLAGS): Drop "-x c", moving it to...
> (C_SELFTEST_FLAGS): New.
> (CPP_SELFTEST_FLAGS): New.
> (SELFTEST_DEPS): New, from deps of s-selftest.
> (C_SELFTEST_DEPS): New, from deps of s-selftest.
> (CPP_SELFTEST_DEPS): New.
> (selftest): Add dependency on s-selftest-c++.
> (s-selftest): Rename to...
> (s-selftest-c): ...this, moving deps to SELFTEST_DEPS
> and C_SELFTEST_DEPS, and using C_SELFTEST_FLAGS rather
> than SELFTEST_FLAGS.
> (selftest-gdb): Rename to...
> (selftest-c-gdb): ...this, using C_SELFTEST_DEPS and
> C_SELFTEST_FLAGS.
> (selftest-gdb): Reintroduce as an alias for selftest-c-gdb.
> (selftest-valgrind): Rename to...
> (selftest-c-valgrind): ...this, using C_SELFTEST_DEPS and
> C_SELFTEST_FLAGS.
> (selftest-valgrind): Reintroduce as an alias for
> selftest-c-valgrind.
> (s-selftest-c++): New.
> (selftest-c++-gdb): New.
> (selftest-c++-valgrind): New.
>
> gcc/c-family/ChangeLog:
> * c-common.c (selftest::c_family_tests): New.
> * c-common.h (selftest::run_c_tests): Move decl to c/c-lang.h.
> (selftest::c_family_tests): New decl.
>
> gcc/c/ChangeLog:
> * c-lang.c (selftest::run_c_tests): Move body to c_family_tests,
> and call that instead.
> * c-tree.h (selftest::run_c_tests): New decl.
>
> gcc/cp/ChangeLog:
> * cp-lang.c (LANG_HOOKS_RUN_LANG_SELFTESTS): Define as
> selftest::run_cp_tests.
> (selftest::run_cp_tests): New function.
> * cp-tree.h (selftest::run_cp_tests): New decl.
OK.
jeff
prev parent reply other threads:[~2017-06-30 15:57 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-06-22 23:47 David Malcolm
2017-06-22 23:47 ` [PATCH 2/2] C++: bulletproof the %H and %I format codes (PR c++/81167) David Malcolm
2017-06-27 12:43 ` Nathan Sidwell
2017-06-30 15:57 ` Jeff Law [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=27ddeda0-6dd6-a28e-c372-56051eec8cee@redhat.com \
--to=law@redhat.com \
--cc=dmalcolm@redhat.com \
--cc=gcc-patches@gcc.gnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).