public inbox for gcc-bugs@sourceware.org help / color / mirror / Atom feed
From: "Bil.Kleb at NASA dot gov" <gcc-bugzilla@gcc.gnu.org> To: gcc-bugs@gcc.gnu.org Subject: [Bug fortran/53940] warn about duplicate USE Date: Thu, 12 Jul 2012 13:25:00 -0000 [thread overview] Message-ID: <bug-53940-4-bcAn3f6s4N@http.gcc.gnu.org/bugzilla/> (raw) In-Reply-To: <bug-53940-4@http.gcc.gnu.org/bugzilla/> http://gcc.gnu.org/bugzilla/show_bug.cgi?id=53940 --- Comment #2 from Bil Kleb <Bil.Kleb at NASA dot gov> 2012-07-12 13:25:29 UTC --- I guess I see the USE ONLY as similar to a declaration, and to have two of the same declarations in a program is an error, e.g., $ cat duplicate_declaration.f90 << EOF program duplicate_declaration integer :: var integer :: var ! should produce at least a warning? var = 1 print*, var end program EOF % gfortran duplicate_declaration.f90 duplicate_declaration.f90:3.16: integer :: var ! should produce at least a warning? 1 Error: Symbol 'var' at (1) already has basic type of INTEGER While the error is mostly harmless, we find it useful to know about to keep our code clean.
next prev parent reply other threads:[~2012-07-12 13:25 UTC|newest] Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top 2012-07-12 12:33 [Bug fortran/53940] New: " Bil.Kleb at NASA dot gov 2012-07-12 13:09 ` [Bug fortran/53940] " burnus at gcc dot gnu.org 2012-07-12 13:25 ` Bil.Kleb at NASA dot gov [this message] 2012-07-12 13:45 ` [Bug fortran/53940] Optionally warn about multiple explicit USE-association of the same symbol burnus at gcc dot gnu.org 2014-05-19 16:03 ` Joost.VandeVondele at mat dot ethz.ch 2015-10-13 16:28 ` dominiq at lps dot ens.fr 2020-07-30 15:37 ` dominiq at lps dot ens.fr
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-53940-4-bcAn3f6s4N@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).