One more test-suite rearrangement

Zack Weinberg zack@wolery.cumb.org
Thu Jun 29 13:43:00 GMT 2000


On Thu, Jun 29, 2000 at 04:13:33PM -0400, Kaveh R. Ghazi wrote:
>  > From: Zack Weinberg <zack@wolery.cumb.org>
>  > 
>  > This patch moves gcc.c-torture/noncompile over to the dg directory.
>  > Tests for error reporting are a much better match to the dg framework;
>  > we can eliminate the fragile list regexps in noncompile.exp entirely.
>  > Also, since dg doesn't iterate over optimization options (which is
>  > useless when you're testing error reports) it runs through this set of
>  > tests about five times faster.
>  > zw
> 
> Moving preprocessor tests is fine, but IIRC some of the noncompile
> tests caused cc1 crashes on Irix6 but only on certain optimization
> and/or debug levels.  So moving tests to dg loses this sanity check.

But even the possibility of that happening is itself a bug in the
compiler.  IMHO, rest_of_compilation should not bother trying to
optimize or emit assembly language if we've seen a hard error.

If there were tests in noncompile that provoked only warnings and no
errors, I would agree with you, but there aren't any.

> Except for cpp testing, IMHO, the fact that dg does not cycle opt
> levels is a very bad thing and we should not put more cc1 tests there
> until this is fixed.  Even if the checks just look for error messages,
> the underlying code always has the potential to crash cc1 with some
> -O# flag.

I believe that the existing tests in gcc.dg which could genuinely
benefit from opt-level cycling are all should-compile or
should-execute tests, just limited to some specific platform.  They
could just as easily live in c-torture, with the platform constraint
placed in an .x file.

zw


More information about the Gcc-patches mailing list