This is the mail archive of the gcc@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: gcc/testsuite incorrect checking of compiler's retval in dg-compile


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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]