This is the mail archive of the
mailing list for the GCC project.
Re: tests for GCC internal functions
- From: Marek Polacek <polacek at redhat dot com>
- To: Martin Sebor <msebor at gmail dot com>
- Cc: GCC Mailing List <gcc at gcc dot gnu dot org>
- Date: Wed, 16 Aug 2017 16:51:04 +0200
- Subject: Re: tests for GCC internal functions
- Authentication-results: sourceware.org; auth=none
- Authentication-results: ext-mx06.extmail.prod.ext.phx2.redhat.com; dmarc=none (p=none dis=none) header.from=redhat.com
- Authentication-results: ext-mx06.extmail.prod.ext.phx2.redhat.com; spf=fail smtp.mailfrom=polacek at redhat dot com
- Dmarc-filter: OpenDMARC Filter v1.3.2 mx1.redhat.com 7C04F3F74E
- References: <email@example.com>
On Wed, Aug 16, 2017 at 08:46:20AM -0600, Martin Sebor wrote:
> Is there a setup for writing and running as part of the test
> suite unit tests that exercise internal GCC functions like
> error and warning? I ask because of a couple of bugs that
> were recently reported for the %s directive in GCC's
> diagnostics (81859 and 81586) that were only caught by running
> valgrind on GCC, but that could have been caught by GCC's own
> tests for these APIs if they existed.
> I can't find any except some in the gcc.dg/plugin directory
> (though they weren't written to exercise the functions but
> rather the plugin interface). Would adding a plugin for
> this sort of thing be the right way to do it?
Isn't -fself-test the thing you're looking for?