public inbox for fortran@gcc.gnu.org
 help / color / mirror / Atom feed
From: Harald Anlauf <anlauf@gmx.de>
To: Andrew Pinski <pinskia@gmail.com>
Cc: fortran <fortran@gcc.gnu.org>
Subject: Aw: Re: Testsuite, dejagnu
Date: Mon, 30 Jan 2023 22:45:44 +0100	[thread overview]
Message-ID: <trinity-b018fef3-df80-4696-929b-ac9189760cdb-1675115144146@3c-app-gmx-bap49> (raw)
In-Reply-To: <CA+=Sn1mnogLT1RxGmT2=23KUpDhBnM69-B6EJ9ukGHW7tBTvbQ@mail.gmail.com>

Hi Andrew,

> Gesendet: Montag, 30. Januar 2023 um 22:13 Uhr
> Von: "Andrew Pinski" <pinskia@gmail.com>
> An: "Harald Anlauf" <anlauf@gmx.de>
> Cc: "fortran" <fortran@gcc.gnu.org>
> Betreff: Re: Testsuite, dejagnu
>
> On Mon, Jan 30, 2023 at 12:27 PM Harald Anlauf via Fortran
> <fortran@gcc.gnu.org> wrote:
> >
> > Dear Hackers,
> >
> > is there a way to check that a particular warning is emitted only
> > once for a source code line instead of multiple times?
> >
> > It appears that by default dg-warn matches one or more times.
>
> One example of how to do this is located in testsuite/g++.dg/lookup/duperr1.C .
> I don't know if this is the best way of doing it though.
> Basically it uses dg-bogus to match the multiple warnings (since it is
> a regex over all output lines and `.*` will even match new lines) so
> you get a failure if there was a duplicated one and then dg-message to
> match the original message just to make sure it is outputted once
> (dg-message was because it was originally a note: rather than a
> warning/error but similar thing can be done for dg-error/dg-warning).

yes, that can be used to make it work for the Fortran testcase at hand!

Thanks,
Harald


>
> Thanks,
> Andrew Pinski
>
>
> >
> > Thanks,
> > Harald
> >
>

      reply	other threads:[~2023-01-30 21:45 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-01-30 20:27 Harald Anlauf
2023-01-30 21:13 ` Andrew Pinski
2023-01-30 21:45   ` Harald Anlauf [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=trinity-b018fef3-df80-4696-929b-ac9189760cdb-1675115144146@3c-app-gmx-bap49 \
    --to=anlauf@gmx.de \
    --cc=fortran@gcc.gnu.org \
    --cc=pinskia@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).