gfortran compiles -------------------- SUBROUTINE OPT1 (IB) IMPLICIT REAL*8 (A-H,O-Z) COMMON /INTNEW/ VL,EPS,BEGIN,STEP END
SUBROUTINE OPT0(E0,H0,P0,NUMB,X,Y) IMPLICIT double precision (A-H,O-Z) COMMON /INTNEW/ V,EPS,BEGIN,STEP,PP,DOM,PIMEAN,AA,A0,BB,B0,PI0,G,G1,G2 END ------------------ without any warning (as does ifort). However, you should either warn or give an error if two commons don't match. NAGWare compiler fails with an ERROR: ------------------ Error: test5.f90: Inconsistent definitions of COMMON block INTNEW in program-units OPT1 and OPT0 ------------------ g95 compiler (with only "-c" and not -Wall) compiles, but spits out the warning: ------------------ In file test5.f90:8 COMMON /INTNEW/ V,EPS,BEGIN,STEP,PP,DOM,PIMEAN,AA,A0,BB,B0,PI0,G,G1,G2 1 In file test5.f90:3 COMMON /INTNEW/ VL,EPS,BEGIN,STEP 2 Warning (121): COMMON block 'intnew' is 120 bytes at (1) and 32 bytes at (2) ------------------ -- Summary: Warn or give error, when common blocks don't match Product: gcc Version: unknown Status: UNCONFIRMED Severity: normal Priority: P3 Component: fortran AssignedTo: unassigned at gcc dot gnu dot org ReportedBy: tobias dot burnus at physik dot fu-berlin dot de http://gcc.gnu.org/bugzilla/show_bug.cgi?id=27327