public inbox for gcc-bugs@sourceware.org help / color / mirror / Atom feed
From: "burnus at gcc dot gnu dot org" <gcc-bugzilla@gcc.gnu.org> To: gcc-bugs@gcc.gnu.org Subject: [Bug fortran/30658] New: Optionally, generate .mod files with the interface for files containing only procedures Date: Wed, 31 Jan 2007 19:47:00 -0000 [thread overview] Message-ID: <bug-30658-13404@http.gcc.gnu.org/bugzilla/> (raw) Currently, there the interface of procedure calls is only checked if they are use or host associated. It would be useful as error check, if optionally for all procedures which are neither part of a module nor of the program, a .MOD file could be created which contains their interface. Example (put in one or two files, compile together or separately): ----------------------- program main real(8) :: number number = run_u() end program main function run_u() implicit none real(4) :: run_u run_u = 42.0 end function run_u ----------------------- The Intel compiler supports such an option: -gen-interface -warn interface this creates: run_u_mod.mod and run_u_mod.f90 ------------------------------------ !COMPILER-GENERATED INTERFACE MODULE: Wed Jan 31 20:46:20 2007 MODULE RUN_U_mod INTERFACE FUNCTION RUN_U RESULT(RUN_U_0) REAL(KIND=4) :: RUN_U_0 END FUNCTION RUN_U END INTERFACE END MODULE RUN_U_mod ------------------------------------ which are then used. (Actually, ifort remains silent about the problem above. It probably converts the real(4) into a real(8), but does not warn!) Expected: - gfortran has a similar option, which creates a .MOD file - Maybe gfortran should also have another option to create a .f90 file (Don't unify these options; as the .f90 files clutter only the directory.) -- Summary: Optionally, generate .mod files with the interface for files containing only procedures Product: gcc Version: 4.3.0 Status: UNCONFIRMED Severity: enhancement Priority: P3 Component: fortran AssignedTo: unassigned at gcc dot gnu dot org ReportedBy: burnus at gcc dot gnu dot org http://gcc.gnu.org/bugzilla/show_bug.cgi?id=30658
next reply other threads:[~2007-01-31 19:47 UTC|newest] Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top 2007-01-31 19:47 burnus at gcc dot gnu dot org [this message] 2007-01-31 19:54 ` [Bug fortran/30658] " burnus at gcc dot gnu dot org 2007-08-15 12:56 ` fxcoudert at gcc dot gnu dot 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-30658-13404@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).