This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: gcc/testsuite incorrect checking of compiler's retval in dg-compile
- From: Janis Johnson <janis187 at us dot ibm dot com>
- To: Bernhard Fischer <rep dot nop at aon dot at>
- Cc: gcc at gcc dot gnu dot org, Janis Johnson <janis187 at us dot ibm dot com>
- Date: Thu, 19 Oct 2006 15:31:15 -0700
- Subject: Re: gcc/testsuite incorrect checking of compiler's retval in dg-compile
- References: <20061018212239.GF5119@aon.at>
On Wed, Oct 18, 2006 at 11:22:40PM +0200, Bernhard Fischer wrote:
> Hi,
>
> I need to check for a non-0 return value in dg-compile testcases in
> gcc.
The compiler's exit status is only known within code from the DejaGnu
product, in proc default_target_compile in DejaGnu's target.exp. If
there was any output from the compilation then the exit status isn't
passed back to the testsuite support that's under our control. I don't
see a clean way to get around this.
We can't get to the exit status, but we can check whether or not the
compilation's output file (a.out, .o, .i, whatever) was produced. Would
it be worthwhile to have a new test directive that says to fail the test
if the output file was produced?
Janis