public inbox for gcc@gcc.gnu.org
 help / color / mirror / Atom feed
* dg-warning: bogus target expectations?
@ 2009-04-24  0:14 DJ Delorie
  2009-04-28  3:37 ` Janis Johnson
  0 siblings, 1 reply; 5+ messages in thread
From: DJ Delorie @ 2009-04-24  0:14 UTC (permalink / raw)
  To: gcc


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.

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: dg-warning: bogus target expectations?
  2009-04-24  0:14 dg-warning: bogus target expectations? DJ Delorie
@ 2009-04-28  3:37 ` Janis Johnson
  2009-04-28  3:49   ` DJ Delorie
  0 siblings, 1 reply; 5+ messages in thread
From: Janis Johnson @ 2009-04-28  3:37 UTC (permalink / raw)
  To: DJ Delorie; +Cc: gcc

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





^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: dg-warning: bogus target expectations?
  2009-04-28  3:37 ` Janis Johnson
@ 2009-04-28  3:49   ` DJ Delorie
  2009-04-28  4:18     ` Janis Johnson
  0 siblings, 1 reply; 5+ messages in thread
From: DJ Delorie @ 2009-04-28  3:49 UTC (permalink / raw)
  To: janis187; +Cc: gcc


> I'm convinced that if check_effective_target_xxx exists then it is
> called and the test directive works as intended.

Hmmm... how did you prove this?  I tried putting verbose in them,
nothing printed.  I tried reversing them, no change in test results.

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: dg-warning: bogus target expectations?
  2009-04-28  3:49   ` DJ Delorie
@ 2009-04-28  4:18     ` Janis Johnson
  2009-04-28  4:51       ` DJ Delorie
  0 siblings, 1 reply; 5+ messages in thread
From: Janis Johnson @ 2009-04-28  4:18 UTC (permalink / raw)
  To: DJ Delorie; +Cc: gcc

On Mon, 2009-04-27 at 19:07 -0400, DJ Delorie wrote:
> > I'm convinced that if check_effective_target_xxx exists then it is
> > called and the test directive works as intended.
> 
> Hmmm... how did you prove this?  I tried putting verbose in them,
> nothing printed.  I tried reversing them, no change in test results.

I used send_log in GCC's override of dg-process-target and in the
one in DejaGnu when running gcc.target/powerpc/altivec-21.c and
other tests that differ for -m32 and -m64.  When you used verbose,
did you pass --verbose within RUNTESTFLAGS?

Janis

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: dg-warning: bogus target expectations?
  2009-04-28  4:18     ` Janis Johnson
@ 2009-04-28  4:51       ` DJ Delorie
  0 siblings, 0 replies; 5+ messages in thread
From: DJ Delorie @ 2009-04-28  4:51 UTC (permalink / raw)
  To: janis187; +Cc: gcc


> When you used verbose, did you pass --verbose within RUNTESTFLAGS?

Yes, I passed enough -v's to see what was happening.  Odd.  Well, if
you've proven it to yourself, that's good enough for me.

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2009-04-27 23:41 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2009-04-24  0:14 dg-warning: bogus target expectations? DJ Delorie
2009-04-28  3:37 ` Janis Johnson
2009-04-28  3:49   ` DJ Delorie
2009-04-28  4:18     ` Janis Johnson
2009-04-28  4:51       ` DJ Delorie

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).