public inbox for gcc-bugs@sourceware.org help / color / mirror / Atom feed
From: "fx at gnu dot org" <gcc-bugzilla@gcc.gnu.org> To: gcc-bugs@gcc.gnu.org Subject: [Bug fortran/100724] New: -fwhole-program breaks module use Date: Sat, 22 May 2021 14:21:00 +0000 [thread overview] Message-ID: <bug-100724-4@http.gcc.gnu.org/bugzilla/> (raw) https://gcc.gnu.org/bugzilla/show_bug.cgi?id=100724 Bug ID: 100724 Summary: -fwhole-program breaks module use Product: gcc Version: 11.1.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: fortran Assignee: unassigned at gcc dot gnu.org Reporter: fx at gnu dot org Target Milestone: --- I found that trying gfortran -fwhole-program failed to link a case I tried, with undefined references to routines with interface blocks. It's OK with gfortran 10. Here's a trivial example (on Debian 10, but I don't suppose that matters): $ gfortran-11 --version GNU Fortran (GCC) 11.1.0 $ cat test.f90 module tw interface real function twice (x) end function twice end interface end module tw real function twice (x) twice = 2*x end function twice use tw read *, x print *, twice (x) end $ gfortran-11 -O -fwhole-program test.f90 /usr/bin/ld: /tmp/ccBKHiLp.o: in function `MAIN__': test.f90:(.text+0x7d): undefined reference to `twice_' collect2: error: ld returned 1 exit status
next reply other threads:[~2021-05-22 14:21 UTC|newest] Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top 2021-05-22 14:21 fx at gnu dot org [this message] 2021-05-23 19:19 ` [Bug fortran/100724] " anlauf at gcc dot gnu.org 2021-05-24 11:04 ` fx at gnu dot org 2021-05-24 19:59 ` anlauf at gcc dot gnu.org 2021-05-25 7:18 ` rguenth at gcc dot gnu.org 2021-05-25 10:48 ` fx at gnu dot org 2021-05-25 19:19 ` hubicka at ucw dot cz
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-100724-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).