From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 7166 invoked by alias); 31 Jan 2007 19:47:27 -0000 Received: (qmail 7108 invoked by uid 48); 31 Jan 2007 19:47:11 -0000 Date: Wed, 31 Jan 2007 19:47:00 -0000 Subject: [Bug fortran/30658] New: Optionally, generate .mod files with the interface for files containing only procedures X-Bugzilla-Reason: CC Message-ID: Reply-To: gcc-bugzilla@gcc.gnu.org To: gcc-bugs@gcc.gnu.org From: "burnus at gcc dot gnu dot org" Mailing-List: contact gcc-bugs-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Archive: List-Post: List-Help: Sender: gcc-bugs-owner@gcc.gnu.org X-SW-Source: 2007-01/txt/msg02752.txt.bz2 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