public inbox for gcc-bugs@sourceware.org help / color / mirror / Atom feed
From: "hockney at jpl dot nasa.gov" <gcc-bugzilla@gcc.gnu.org> To: gcc-bugs@gcc.gnu.org Subject: [Bug fortran/97799] New: Passing CHARACTER*(*) var(*) through ENTRY causes segfaults Date: Wed, 11 Nov 2020 16:33:54 +0000 [thread overview] Message-ID: <bug-97799-4@http.gcc.gnu.org/bugzilla/> (raw) https://gcc.gnu.org/bugzilla/show_bug.cgi?id=97799 Bug ID: 97799 Summary: Passing CHARACTER*(*) var(*) through ENTRY causes segfaults Product: gcc Version: unknown Status: UNCONFIRMED Severity: normal Priority: P3 Component: fortran Assignee: unassigned at gcc dot gnu.org Reporter: hockney at jpl dot nasa.gov Target Milestone: --- Created attachment 49548 --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=49548&action=edit bugtest.f -- program evincing bug When a character(*)* var(*) is passed to a subroutine through an entry point in another subroutine, gfortran 10.2.0 generates an exectuable which segfaults in a probablistic way. This is probably related to a warning about an internally generated variable being used uninitialized. The warning and error do not occur in gfortran 9.2.0 The attached file bugtest.f evinces this behavior. The attached file details.txt shows the exact compilition flags to reproduce the failure, and also the resulting backtrace. The exact combination of compilation flags matters. All of them produce the warning about carray.0 but some of them both work and pass our valgrind test: gfortran -Wall -g -S bugtest.f; gfortran bugtest.s -o bugtest # fail gfortran -g bugtest.f -o bugtest # fail gfortran -O1 bugtest.f -o bugtest # fail gfortran -O2 bugtest.f -o bugtest # ok gfortran -O3 bugtest.f -o bugtest # ok gfortran -O2 -fPIC bugtest.f -o bugtest # fail gfortran -O3 -fPIC bugtest.f -o bugtest # fail The valgrind error trace for the errors is: ==32181== Conditional jump or move depends on uninitialised value(s) ==32181== at 0x401438: master.0.top_entry_ (bugtest.f:53) ==32181== by 0x40141B: char_entry_ (bugtest.f:49) ==32181== by 0x40148F: MAIN__ (bugtest.f:6) ==32181== by 0x401698: main (bugtest.f:12) gfortran 9.2.0 does not evince this bug.
next reply other threads:[~2020-11-11 16:33 UTC|newest] Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top 2020-11-11 16:33 hockney at jpl dot nasa.gov [this message] 2020-11-11 16:36 ` [Bug fortran/97799] " hockney at jpl dot nasa.gov 2020-11-11 16:37 ` hockney at jpl dot nasa.gov 2020-11-11 16:59 ` dominiq at lps dot ens.fr 2020-11-11 17:51 ` ted.drain at jpl dot nasa.gov 2020-11-11 18:57 ` dominiq at lps dot ens.fr 2020-11-11 20:23 ` anlauf at gcc dot gnu.org 2020-11-11 21:11 ` hockney at jpl dot nasa.gov 2020-11-12 6:26 ` tkoenig at gcc dot gnu.org 2020-11-12 7:53 ` tkoenig at gcc dot gnu.org 2020-11-12 13:27 ` tkoenig at gcc dot gnu.org 2020-11-12 15:29 ` hockney at jpl dot nasa.gov 2020-11-13 10:32 ` [Bug fortran/97799] [10/11 Regression] " tkoenig at gcc dot gnu.org 2020-11-13 11:09 ` jakub at gcc dot gnu.org 2020-11-13 11:11 ` jakub 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-97799-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).