On Thu, 2009-04-23 at 17:10 -0400, DJ Delorie wrote:
> In gcc.dg/Wconversion-real.c we see this:
> 
>   vdouble = 3.1L; /* { dg-warning "conversion" "" { target large_long_double 
> } } */
> 
> It turns out check_effective_target_large_long_double is NEVER called.
> You can change it to some bogus string:
> 
>   fdouble (3.1L); /* { dg-warning "conversion" "" { target dj_wins } } */
> 
> and the test still passes - no complaints about a missing "dj_wins"
> like you'd get with the dg-require-effective-target command.  Have we
> been silently ignoring those warnings for *every* target all along?
> 
> I ask because I'm adding some new check-effectives, and reversed the
> sense of the check to make sure it was doing its job, and found that
> it wasn't.

I'm convinced that if check_effective_target_xxx exists then it is
called and the test directive works as intended.  You're correct,
though, that a bogus effective-target keyword is not flagged as an
error and is treated as if the target does not match.  This can be
fixed by removing the "catch" in the call to dg-error or dg-warning
from process-message in gcc/testsuite/lib/gcc-dg.exp.  I'll test
that to see what else might break as a result.

Thanks for reporting this.

Janis





Reply via email to