public inbox for fortran@gcc.gnu.org
 help / color / mirror / Atom feed
From: Tobias Burnus <tobias@codesourcery.com>
To: Paul Richard Thomas <paul.richard.thomas@gmail.com>,
	"fortran@gcc.gnu.org" <fortran@gcc.gnu.org>,
	gcc-patches <gcc-patches@gcc.gnu.org>
Cc: "Jürgen Reuter" <juergen.reuter@desy.de>,
	"Harald Anlauf" <anlauf@gmx.de>
Subject: Re: [Patch, fortran] PR99602 - [11 regression] runtime error: pointer actual argument not associated
Date: Thu, 18 Mar 2021 09:46:24 +0100	[thread overview]
Message-ID: <2c797dfe-a401-0f2a-b121-e6ba0c98179b@codesourcery.com> (raw)
In-Reply-To: <4ee532b7-eed8-8dd7-4e01-9a2e8004007c@codesourcery.com>

Hi Paul, hi all fortran@/gcc-patch@ reader,

it looks as if you replied with your patch submission to the wrong email
address – and your re-submission ended up at https://gcc.gnu.org/PR99602#c17

On 16.03.21 18:08, Tobias Burnus wrote:
> On 16.03.21 17:42, Paul Richard Thomas via Gcc-patches wrote:
>> Fortran: Fix runtime errors for class actual arguments [PR99602].
>> * trans-array.c (gfc_conv_procedure_call): For class formal
>> arguments, use the _data field attributes for runtime errors.
>> * gfortran.dg/pr99602.f90: New test.
> Shouldn't there be also a testcase which triggers this run-time error?

Note: The new submission consists of a new testcase (now two) and the
actual patch; the new testcase removes 'pointer' from the dummy argument
of prepare_m2_proc/prepare_whizard_m2 and checks via the
-ftree-original-dump that there is now run-time check code inserted when
passing a (nullified) pointer to a nonpointer dummy argument.

Compared to previous patch, 'fsym_attr.pointer =
fsym_attr.class_pointer' is new, before it was 'fsym_attr.pointer =
fsym_attr.pointer'.

Paul Richard Thomas wrote in PR99602:

> Good morning all,
>
> I have attached the revised patch and an additional testcase. I had totally
> forgotten about the class pointer gotcha.
>
> OK for master?
>
> Paul
>
> Fortran: Fix runtime errors for class actual arguments [PR99602  <https://gcc.gnu.org/bugzilla/show_bug.cgi?id=99602>].

LGTM – thanks for the patch.

I am wondering whether the second testcase should be a 'dg-do run' test
instead of 'compile' to ensure that the error is indeed triggered
(currently, it only checks the tree dump that a check is inserted). What
do you think? [If you do so, you need a dg-shouldfail + dg-output, cf.
e.g. pointer_check_5.f90.]

Thanks,

Tobias

-----------------
Mentor Graphics (Deutschland) GmbH, Arnulfstrasse 201, 80634 München Registergericht München HRB 106955, Geschäftsführer: Thomas Heurung, Frank Thürauf

  parent reply	other threads:[~2021-03-18  8:46 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-03-16 16:42 Paul Richard Thomas
2021-03-16 17:08 ` Tobias Burnus
2021-03-16 20:26   ` Aw: " Harald Anlauf
2021-03-18  8:46   ` Tobias Burnus [this message]
2021-03-18 13:22     ` Paul Richard Thomas
2021-03-26  6:58 Paul Richard Thomas
2021-03-26 11:22 ` Tobias Burnus
2021-03-29  9:15   ` Paul Richard Thomas

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=2c797dfe-a401-0f2a-b121-e6ba0c98179b@codesourcery.com \
    --to=tobias@codesourcery.com \
    --cc=anlauf@gmx.de \
    --cc=fortran@gcc.gnu.org \
    --cc=gcc-patches@gcc.gnu.org \
    --cc=juergen.reuter@desy.de \
    --cc=paul.richard.thomas@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).