public inbox for gcc-bugs@sourceware.org help / color / mirror / Atom feed
From: "burnus at gcc dot gnu.org" <gcc-bugzilla@gcc.gnu.org> To: gcc-bugs@gcc.gnu.org Subject: [Bug fortran/103496] New: [F2018][TS29113] C_SIZEOF – rejects now valid args with 'must be an interoperable data entity' Date: Tue, 30 Nov 2021 13:54:34 +0000 [thread overview] Message-ID: <bug-103496-4@http.gcc.gnu.org/bugzilla/> (raw) https://gcc.gnu.org/bugzilla/show_bug.cgi?id=103496 Bug ID: 103496 Summary: [F2018][TS29113] C_SIZEOF – rejects now valid args 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 – using an array descriptor as defined in TS29113 / F2018: 8 | print *, c_sizeof(a(:)) | 1 Error: ‘x’ argument of ‘c_sizeof’ intrinsic at (1) must be an interoperable data entity: Only whole-arrays are interoperable 12 | print *, c_sizeof(p) | 1 Error: ‘x’ argument of ‘c_sizeof’ 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
next reply other threads:[~2021-11-30 13:54 UTC|newest] Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top 2021-11-30 13:54 burnus at gcc dot gnu.org [this message] 2021-11-30 20:14 ` [Bug fortran/103496] " anlauf at gcc dot gnu.org 2021-11-30 21:02 ` burnus at gcc dot gnu.org 2024-04-10 17:19 ` anlauf at gcc dot gnu.org 2024-04-12 8:59 ` burnus at gcc dot gnu.org 2024-04-12 19:18 ` anlauf at gcc dot gnu.org 2024-04-23 18:25 ` cvs-commit at gcc dot gnu.org 2024-04-23 18:28 ` anlauf 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-103496-4@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: linkBe 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).