From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 6C2A53858408; Tue, 30 Nov 2021 13:54:34 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 6C2A53858408 From: "burnus at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: =?UTF-8?B?W0J1ZyBmb3J0cmFuLzEwMzQ5Nl0gTmV3OiBbRjIwMThdW1RTMjkx?= =?UTF-8?B?MTNdIENfU0laRU9GIOKAkyByZWplY3RzIG5vdyB2YWxpZCBhcmdzIHdpdGgg?= =?UTF-8?B?J211c3QgYmUgYW4gaW50ZXJvcGVyYWJsZSBkYXRhIGVudGl0eSc=?= Date: Tue, 30 Nov 2021 13:54:34 +0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: new X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: fortran X-Bugzilla-Version: 12.0 X-Bugzilla-Keywords: rejects-valid X-Bugzilla-Severity: normal X-Bugzilla-Who: burnus at gcc dot gnu.org X-Bugzilla-Status: UNCONFIRMED X-Bugzilla-Resolution: X-Bugzilla-Priority: P3 X-Bugzilla-Assigned-To: unassigned at gcc dot gnu.org X-Bugzilla-Target-Milestone: --- X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: bug_id short_desc product version bug_status keywords bug_severity priority component assigned_to reporter target_milestone Message-ID: 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: Tue, 30 Nov 2021 13:54:34 -0000 https://gcc.gnu.org/bugzilla/show_bug.cgi?id=3D103496 Bug ID: 103496 Summary: [F2018][TS29113] C_SIZEOF =E2=80=93 rejects now valid a= rgs with 'must be an interoperable data entity' Product: gcc Version: 12.0 Status: UNCONFIRMED Keywords: rejects-valid Severity: normal Priority: P3 Component: fortran Assignee: unassigned at gcc dot gnu.org Reporter: burnus at gcc dot gnu.org Target Milestone: --- The following should now be fine =E2=80=93 using an array descriptor as def= ined in TS29113 / F2018: 8 | print *, c_sizeof(a(:)) | 1 Error: =E2=80=98x=E2=80=99 argument of =E2=80=98c_sizeof=E2=80=99 intrinsic= at (1) must be an interoperable data entity: Only whole-arrays are interoperable 12 | print *, c_sizeof(p) | 1 Error: =E2=80=98x=E2=80=99 argument of =E2=80=98c_sizeof=E2=80=99 intrinsic= at (1) must be an interoperable data entity: Only explicit-size and assumed-size arrays are interoperable ---------------------- use iso_c_binding implicit none integer :: a(6) integer, pointer :: p(:) print *, c_sizeof(a) ! 6*4 - OK print *, c_sizeof(a(1)) ! 4 - OK print *, c_sizeof(a(:)) ! 6*4 - OK, rejected print *, c_sizeof(a(2::2)) ! 3*4 - rejected allocate(p(5)) print *, c_sizeof(p) ! 5*4 - rejected print *, c_sizeof(p(1)) ! 4 - OK print *, c_sizeof(p(:)) ! 5*4 - rejected print *, c_sizeof(p(2::2)) ! 2*4 - rejected end=