public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
From: "pault at gcc dot gnu.org" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug fortran/99602] [11 regression] runtime error: pointer actual argument not associated
Date: Fri, 19 Mar 2021 09:35:21 +0000	[thread overview]
Message-ID: <bug-99602-4-9HYnBOTzao@http.gcc.gnu.org/bugzilla/> (raw)
In-Reply-To: <bug-99602-4@http.gcc.gnu.org/bugzilla/>

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=99602

--- Comment #28 from Paul Thomas <pault at gcc dot gnu.org> ---
(In reply to Jürgen Reuter from comment #27)
> Created attachment 50432 [details]
> reproducer, down to 6800 lines

Hi Juergen,

Stop! Yesterday's final is just fine. The problem is connected with the logic
selecting the runtime error. The code for line 483 ends with

                      D.5856 = model->_vptr->get_par_data_ptr (&model.110,
D.5855);
                      if ((character(kind=1)[0:][1:1] * restrict)
D.5855->chars.data != 0B)
                        {
                          __builtin_free ((void *) D.5855->chars.data);
                          (character(kind=1)[0:][1:1] * restrict)
D.5855->chars.data = 0B;
                        }
                      if ((integer(kind=8)) (D.5856._data == 0B))
                        {
                          _gfortran_runtime_error_at (&"At line 483 of file
models.f90"[1]{lb: 1 sz: 1}, &"Proc-pointer actual argument \'model\' is not
associated"[1]{lb: 1 sz: 1});
                        }
                      field_data_set (&class.109, 0B, 0B, 0B, 0B, 0B, 0B, 0B,
0B, 0B, 0B, 0B, 0B, 0B, 0B, 0B, 0B, 0B, 0B, 0B, 0B, 0B, 0B, 0B, &D.5856, 0B,
0B, 0B);
                    }

The _data field of D.5856 is the result of the call to 'get_par_data_ptr' not
the procedure pointer itself. The result is:
class(modelpar_data_t), pointer :: ptr and the formal argument is:
class(modelpar_data_t), intent(in), pointer, optional :: mass_data

So the call is perfectly proper. The trouble is that the attributes of the
proc_pointer result are not being used.

I am about to start a gdb session :-)

Paul

  parent reply	other threads:[~2021-03-19  9:35 UTC|newest]

Thread overview: 40+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-03-15 14:24 [Bug fortran/99602] New: " juergen.reuter at desy dot de
2021-03-15 14:39 ` [Bug fortran/99602] " juergen.reuter at desy dot de
2021-03-15 23:01 ` juergen.reuter at desy dot de
2021-03-15 23:07 ` juergen.reuter at desy dot de
2021-03-16  7:30 ` juergen.reuter at desy dot de
2021-03-16  7:31 ` juergen.reuter at desy dot de
2021-03-16  7:32 ` juergen.reuter at desy dot de
2021-03-16  7:33 ` juergen.reuter at desy dot de
2021-03-16  8:14 ` rguenth at gcc dot gnu.org
2021-03-16  8:31 ` pault at gcc dot gnu.org
2021-03-16  8:43 ` juergen.reuter at desy dot de
2021-03-16 10:29 ` juergen.reuter at desy dot de
2021-03-16 11:50 ` pault at gcc dot gnu.org
2021-03-16 13:45 ` pault at gcc dot gnu.org
2021-03-16 13:47 ` juergen.reuter at desy dot de
2021-03-16 20:29 ` anlauf at gcc dot gnu.org
2021-03-17 13:51 ` juergen.reuter at desy dot de
2021-03-17 17:57 ` anlauf at gcc dot gnu.org
2021-03-18  7:26 ` paul.richard.thomas at gmail dot com
2021-03-18 20:58 ` juergen.reuter at desy dot de
2021-03-18 23:03 ` juergen.reuter at desy dot de
2021-03-18 23:54 ` juergen.reuter at desy dot de
2021-03-19  1:20 ` juergen.reuter at desy dot de
2021-03-19  2:23 ` juergen.reuter at desy dot de
2021-03-19  2:24 ` juergen.reuter at desy dot de
2021-03-19  7:37 ` juergen.reuter at desy dot de
2021-03-19  8:16 ` juergen.reuter at desy dot de
2021-03-19  9:35 ` pault at gcc dot gnu.org [this message]
2021-03-19  9:53 ` juergen.reuter at desy dot de
2021-03-21 18:53 ` pault at gcc dot gnu.org
2021-03-21 22:25 ` juergen.reuter at desy dot de
2021-03-23 19:31 ` juergen.reuter at desy dot de
2021-03-24  6:31 ` pault at gcc dot gnu.org
2021-03-24  8:25 ` juergen.reuter at desy dot de
2021-03-28 18:40 ` cvs-commit at gcc dot gnu.org
2021-03-29 10:31 ` juergen.reuter at desy dot de
2021-04-27 11:40 ` [Bug fortran/99602] [11/12 " jakub at gcc dot gnu.org
2021-05-04 12:32 ` rguenth at gcc dot gnu.org
2021-07-28  7:06 ` rguenth at gcc dot gnu.org
2021-07-28 13:01 ` pault at gcc dot gnu.org

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=bug-99602-4-9HYnBOTzao@http.gcc.gnu.org/bugzilla/ \
    --to=gcc-bugzilla@gcc.gnu.org \
    --cc=gcc-bugs@gcc.gnu.org \
    /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).