public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
From: Thomas Schwinge <thomas@codesourcery.com>
To: Tobias Burnus <tobias@codesourcery.com>,
	<gcc-patches@gcc.gnu.org>, <fortran@gcc.gnu.org>
Cc: Thomas Koenig <tkoenig@netcologne.de>
Subject: Re: [Patch] Fortran: Fix assumed-size to assumed-rank passing [PR94070]
Date: Tue, 28 Sep 2021 14:30:06 +0200	[thread overview]
Message-ID: <874ka4zxv5.fsf@euler.schwinge.homeip.net> (raw)
In-Reply-To: <89e972fd-fd0c-4269-4598-b025faa7e0ca@codesourcery.com>

[-- Attachment #1: Type: text/plain, Size: 2109 bytes --]

Hi!

On 2021-09-27T14:07:53+0200, Tobias Burnus <tobias@codesourcery.com> wrote:
> now committed r12-3897-g00f6de9c69119594f7dad3bd525937c94c8200d0


> Conclusion: Reviews are very helpful :-)

Ha!  :-) (... and I wasn't even involed here!)  ;-P


As testing showed here:

> --- /dev/null
> +++ b/gcc/testsuite/gfortran.dg/assumed_rank_22_aux.c
> @@ -0,0 +1,68 @@
> +/* Called by assumed_rank_22.f90.  */

> +  if (num == 0)
> +    assert (x->dim[2].extent == -1);
> +  else if (num == 20)
> +    assert (x->dim[2].extent == 1);
> +  else if (num == 40)
> +    {
> +      /* FIXME: - dg-output = 'c_assumed ... OK' checked in .f90 file. */
> +      /* assert (x->dim[2].extent == 0); */
> +      if (x->dim[2].extent == 0)
> +     __builtin_printf ("c_assumed - 40 - OK\n");
> +      else
> +     __builtin_printf ("ERROR: c_assumed num=%d: "
> +                   "x->dim[2].extent = %d != 0\n",
> +                   num, x->dim[2].extent);
> +    }
> +  else if (num == 60)
> +    assert (x->dim[2].extent == 2);
> +  else if (num == 80)
> +    assert (x->dim[2].extent == 2);
> +  else if (num == 100)
> +    {
> +      /* FIXME: - dg-output = 'c_assumed ... OK' checked in .f90 file. */
> +      /* assert (x->dim[2].extent == 0); */
> +      if (x->dim[2].extent == 0)
> +     __builtin_printf ("c_assumed - 100 - OK\n");
> +      else
> +     __builtin_printf ("ERROR: c_assumed num=%d: "
> +                   "x->dim[2].extent = %d != 0\n",
> +                   num, x->dim[2].extent);
> +    }
> +  else
> +    assert (0);

... the 'ERROR:' prefixes printed do confuse DejaGnu...  As obvious,
pushed to master branch commit 95540a6d1d7b29cdd3ed06fbcb07465804504cfd
"'gfortran.dg/assumed_rank_22_aux.c' messages printed vs. DejaGnu", see
attached.


Grüße
 Thomas


-----------------
Siemens Electronic Design Automation GmbH; Anschrift: Arnulfstraße 201, 80634 München; Gesellschaft mit beschränkter Haftung; Geschäftsführer: Thomas Heurung, Frank Thürauf; Sitz der Gesellschaft: München; Registergericht München, HRB 106955

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: 0001-gfortran.dg-assumed_rank_22_aux.c-messages-printed-v.patch --]
[-- Type: text/x-diff, Size: 2122 bytes --]

From 95540a6d1d7b29cdd3ed06fbcb07465804504cfd Mon Sep 17 00:00:00 2001
From: Thomas Schwinge <thomas@codesourcery.com>
Date: Tue, 28 Sep 2021 09:02:56 +0200
Subject: [PATCH] 'gfortran.dg/assumed_rank_22_aux.c' messages printed vs.
 DejaGnu

Print lower-case 'error: [...]' instead of upper-case 'ERROR: [...]', to not
confuse the DejaGnu log processing harness into thinking these are DejaGnu
harness ERRORs:

    Running /scratch/tschwing/build2-trusty-cs/gcc/build/submit-big/source-gcc/gcc/testsuite/gfortran.dg/dg.exp ...
    +ERROR: c_assumed num=100: x->dim[2].extent = -1 != 0
    +ERROR: c_assumed num=100: x->dim[2].extent = -1 != 0
    +ERROR: c_assumed num=100: x->dim[2].extent = -1 != 0
    +ERROR: c_assumed num=100: x->dim[2].extent = -1 != 0
    +ERROR: c_assumed num=100: x->dim[2].extent = -1 != 0
    +ERROR: c_assumed num=100: x->dim[2].extent = -1 != 0
    [...]

Fix-up for recent commit 00f6de9c69119594f7dad3bd525937c94c8200d0
"Fortran: Fix assumed-size to assumed-rank passing [PR94070]".

	gcc/testsuite/
	* gfortran.dg/assumed_rank_22_aux.c: Adjust messages printed.
---
 gcc/testsuite/gfortran.dg/assumed_rank_22_aux.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/gcc/testsuite/gfortran.dg/assumed_rank_22_aux.c b/gcc/testsuite/gfortran.dg/assumed_rank_22_aux.c
index 2fbf83d649a..e5fe02135e9 100644
--- a/gcc/testsuite/gfortran.dg/assumed_rank_22_aux.c
+++ b/gcc/testsuite/gfortran.dg/assumed_rank_22_aux.c
@@ -29,7 +29,7 @@ c_assumed (CFI_cdesc_t *x, int num)
       if (x->dim[2].extent == 0)
 	__builtin_printf ("c_assumed - 40 - OK\n");
       else
-	__builtin_printf ("ERROR: c_assumed num=%d: "
+	__builtin_printf ("error: c_assumed num=%d: "
 		      "x->dim[2].extent = %d != 0\n",
 		      num, x->dim[2].extent);
     }
@@ -44,7 +44,7 @@ c_assumed (CFI_cdesc_t *x, int num)
       if (x->dim[2].extent == 0)
 	__builtin_printf ("c_assumed - 100 - OK\n");
       else
-	__builtin_printf ("ERROR: c_assumed num=%d: "
+	__builtin_printf ("error: c_assumed num=%d: "
 		      "x->dim[2].extent = %d != 0\n",
 		      num, x->dim[2].extent);
     }
-- 
2.33.0


      parent reply	other threads:[~2021-09-28 12:30 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-09-21 12:26 Tobias Burnus
2021-09-24 20:38 ` Thomas Koenig
2021-09-27 12:07   ` Tobias Burnus
2021-09-27 12:38     ` [committed] libgomp.oacc-fortran/privatized-ref-2.f90: Fix dg-note (was: [Patch] Fortran: Fix assumed-size to assumed-rank passing [PR94070]) Tobias Burnus
2021-09-28 12:29       ` Thomas Schwinge
2021-09-27 19:34     ` [Patch] Fortran: Fix assumed-size to assumed-rank passing [PR94070] Harald Anlauf
2021-09-28  6:40       ` Tobias Burnus
2021-09-28 19:15         ` Harald Anlauf
2021-09-28 12:30     ` Thomas Schwinge [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=874ka4zxv5.fsf@euler.schwinge.homeip.net \
    --to=thomas@codesourcery.com \
    --cc=fortran@gcc.gnu.org \
    --cc=gcc-patches@gcc.gnu.org \
    --cc=tkoenig@netcologne.de \
    --cc=tobias@codesourcery.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).