public inbox for gcc-bugs@sourceware.org help / color / mirror / Atom feed
From: "mscfd at gmx dot net" <gcc-bugzilla@gcc.gnu.org> To: gcc-bugs@gcc.gnu.org Subject: [Bug fortran/105503] New: vptr and data are uninitialised error for intent(out) argument of abstract type Date: Fri, 06 May 2022 08:33:02 +0000 [thread overview] Message-ID: <bug-105503-4@http.gcc.gnu.org/bugzilla/> (raw) https://gcc.gnu.org/bugzilla/show_bug.cgi?id=105503 Bug ID: 105503 Summary: vptr and data are uninitialised error for intent(out) argument of abstract type Product: gcc Version: 12.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: fortran Assignee: unassigned at gcc dot gnu.org Reporter: mscfd at gmx dot net Target Milestone: --- Created attachment 52932 --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=52932&action=edit uninit_vptr The attached module, compiled with gfortran-12 -Wall uninit_vptr.f90 -c gives uninit_vptr.f90:34:19: 34 | call f%sub(x) | ^ Warning: ‘x._data’ is used uninitialized [-Wuninitialized] uninit_vptr.f90:33:42: 33 | class(a), dimension(:), pointer :: x | ^ note: ‘x’ declared here uninit_vptr.f90:34:19: 34 | call f%sub(x) | ^ Warning: ‘x._vptr’ is used uninitialized [-Wuninitialized] uninit_vptr.f90:33:42: 33 | class(a), dimension(:), pointer :: x | ^ note: ‘x’ declared here But argument x has the intent(out) attribute and the warning seems bogus. (The original code, where this occured, is an implementation of the abstract factory design pattern.)
next reply other threads:[~2022-05-06 8:33 UTC|newest] Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top 2022-05-06 8:33 mscfd at gmx dot net [this message] 2022-05-06 9:31 ` [Bug fortran/105503] " mscfd at gmx dot net
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-105503-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).