From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 92AB13857C68; Fri, 19 Mar 2021 09:53:58 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 92AB13857C68 From: "juergen.reuter at desy dot de" 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:53:58 +0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: fortran X-Bugzilla-Version: 11.0 X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: juergen.reuter at desy dot de X-Bugzilla-Status: NEW X-Bugzilla-Resolution: X-Bugzilla-Priority: P4 X-Bugzilla-Assigned-To: pault at gcc dot gnu.org X-Bugzilla-Target-Milestone: 11.0 X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: Message-ID: In-Reply-To: References: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Bugzilla-URL: http://gcc.gnu.org/bugzilla/ Auto-Submitted: auto-generated MIME-Version: 1.0 X-BeenThere: gcc-bugs@gcc.gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Gcc-bugs mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 19 Mar 2021 09:53:58 -0000 https://gcc.gnu.org/bugzilla/show_bug.cgi?id=3D99602 --- Comment #29 from J=C3=BCrgen Reuter --- (In reply to Paul Thomas from comment #28) > (In reply to J=C3=BCrgen Reuter from comment #27) > > Created attachment 50432 [details] > > reproducer, down to 6800 lines >=20 > Hi Juergen, >=20 > 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 >=20 > D.5856 =3D model->_vptr->get_par_data_ptr (&model.1= 10, > D.5855); > if ((character(kind=3D1)[0:][1:1] * restrict) > D.5855->chars.data !=3D 0B) > { > __builtin_free ((void *) D.5855->chars.data); > (character(kind=3D1)[0:][1:1] * restrict) > D.5855->chars.data =3D 0B; > } > if ((integer(kind=3D8)) (D.5856._data =3D=3D 0B)) > { > _gfortran_runtime_error_at (&"At line 483 of fi= le > 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.58= 56, > 0B, 0B, 0B); > } >=20 > 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 >=20 > So the call is perfectly proper. The trouble is that the attributes of the > proc_pointer result are not being used. >=20 > I am about to start a gdb session :-) >=20 > Paul Cool, very good, I'm never really sure which max. size a reproducer is still useful for you. Then I stop reducing further now.=