public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug fortran/27327] New: Warn or give error, when common blocks don't match
@ 2006-04-26 15:52 tobias dot burnus at physik dot fu-berlin dot de
2006-04-26 16:39 ` [Bug fortran/27327] " pinskia at gcc dot gnu dot org
` (2 more replies)
0 siblings, 3 replies; 4+ messages in thread
From: tobias dot burnus at physik dot fu-berlin dot de @ 2006-04-26 15:52 UTC (permalink / raw)
To: gcc-bugs
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
^ permalink raw reply [flat|nested] 4+ messages in thread
* [Bug fortran/27327] Warn or give error, when common blocks don't match
2006-04-26 15:52 [Bug fortran/27327] New: Warn or give error, when common blocks don't match tobias dot burnus at physik dot fu-berlin dot de
@ 2006-04-26 16:39 ` pinskia at gcc dot gnu dot org
2006-04-26 16:46 ` tobi at gcc dot gnu dot org
2006-04-26 16:48 ` pinskia at gcc dot gnu dot org
2 siblings, 0 replies; 4+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2006-04-26 16:39 UTC (permalink / raw)
To: gcc-bugs
------- Comment #1 from pinskia at gcc dot gnu dot org 2006-04-26 16:39 -------
Confirmed.
--
pinskia at gcc dot gnu dot org changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|UNCONFIRMED |NEW
Ever Confirmed|0 |1
Keywords| |diagnostic
Last reconfirmed|0000-00-00 00:00:00 |2006-04-26 16:39:41
date| |
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=27327
^ permalink raw reply [flat|nested] 4+ messages in thread
* [Bug fortran/27327] Warn or give error, when common blocks don't match
2006-04-26 15:52 [Bug fortran/27327] New: Warn or give error, when common blocks don't match tobias dot burnus at physik dot fu-berlin dot de
2006-04-26 16:39 ` [Bug fortran/27327] " pinskia at gcc dot gnu dot org
@ 2006-04-26 16:46 ` tobi at gcc dot gnu dot org
2006-04-26 16:48 ` pinskia at gcc dot gnu dot org
2 siblings, 0 replies; 4+ messages in thread
From: tobi at gcc dot gnu dot org @ 2006-04-26 16:46 UTC (permalink / raw)
To: gcc-bugs
------- Comment #2 from tobi at gcc dot gnu dot org 2006-04-26 16:46 -------
Works for me, even though the warning could be a bit more verbose. Should this
really be a default warning?
schluter@pcl247d:~/src/pr/27327> gfortran t.f90 -Wall -c
t.f90: In function 'opt1':
t.f90:1: warning: unused variable 'ib'
In file t.f90:8
COMMON /INTNEW/ V,EPS,BEGIN,STEP,PP,DOM,PIMEAN,AA,A0,BB,B0,PI0,G,G1,G2
1
Warning: Named COMMON block 'intnew' at (1) shall be of the same size
t.f90: In function 'opt0':
t.f90:6: warning: unused variable 'numb'
t.f90:6: warning: unused variable 'e0'
t.f90:6: warning: unused variable 'h0'
t.f90:6: warning: unused variable 'p0'
t.f90:6: warning: unused variable 'x'
t.f90:6: warning: unused variable 'y'
schluter@pcl247d:~/src/pr/27327>
--
tobi at gcc dot gnu dot org changed:
What |Removed |Added
----------------------------------------------------------------------------
Severity|normal |enhancement
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=27327
^ permalink raw reply [flat|nested] 4+ messages in thread
* [Bug fortran/27327] Warn or give error, when common blocks don't match
2006-04-26 15:52 [Bug fortran/27327] New: Warn or give error, when common blocks don't match tobias dot burnus at physik dot fu-berlin dot de
2006-04-26 16:39 ` [Bug fortran/27327] " pinskia at gcc dot gnu dot org
2006-04-26 16:46 ` tobi at gcc dot gnu dot org
@ 2006-04-26 16:48 ` pinskia at gcc dot gnu dot org
2 siblings, 0 replies; 4+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2006-04-26 16:48 UTC (permalink / raw)
To: gcc-bugs
------- Comment #3 from pinskia at gcc dot gnu dot org 2006-04-26 16:48 -------
Actually we recomend before filing a bug to use -Wall -W so really this is not
a bug.
--
pinskia at gcc dot gnu dot org changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|NEW |RESOLVED
Resolution| |INVALID
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=27327
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2006-04-26 16:48 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2006-04-26 15:52 [Bug fortran/27327] New: Warn or give error, when common blocks don't match tobias dot burnus at physik dot fu-berlin dot de
2006-04-26 16:39 ` [Bug fortran/27327] " pinskia at gcc dot gnu dot org
2006-04-26 16:46 ` tobi at gcc dot gnu dot org
2006-04-26 16:48 ` pinskia at gcc dot gnu dot org
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).