public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug fortran/30923] New: Warn by default when respecifiying USE associated NAMELIST
@ 2007-02-22 9:21 burnus at gcc dot gnu dot org
2007-03-18 18:01 ` [Bug fortran/30923] Respecifying USE associated NAMELIST should raise warning by default fxcoudert at gcc dot gnu dot org
2007-03-19 9:07 ` burnus at gcc dot gnu dot org
0 siblings, 2 replies; 3+ messages in thread
From: burnus at gcc dot gnu dot org @ 2007-02-22 9:21 UTC (permalink / raw)
To: gcc-bugs
Cf. http://gcc.gnu.org/ml/fortran/2007-02/msg00145.html
The following code is invalid Fortran as the USE-associated NAMELIST is
respecified in the main program:
----------------------------
MODULE debug
LOGICAL debug_area
NAMELIST/debugging/debug_area
END MODULE debug
PROGRAM ding
USE debug
IMPLICIT NONE
NAMELIST/debugging/debug_area
INTEGER :: ios
OPEN(unit=10, status='unknown', file='input.dat')
READ(unit=10, nml=debugging, iostat=ios)
PRINT*, 'nml=debugging',ios
END PROGRAM ding
----------------------------
Gfortran and Portland group Fortran accept it by default, while xlf, ifort, NAG
f95 and g95 reject it by default.
Note that gfortran rejects it with -std=f2003:
Error: Namelist group name 'debugging' at (1) already is USE associated
and cannot be respecified.
Should the GFC_STD_GNU be changed into GFC_STD_LEGACY?
Or should there be a warning only for -std=gnu (= default option)?
Or keep status quo?
--
Summary: Warn by default when respecifiying USE associated
NAMELIST
Product: gcc
Version: 4.3.0
Status: UNCONFIRMED
Keywords: diagnostic
Severity: normal
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=30923
^ permalink raw reply [flat|nested] 3+ messages in thread
* [Bug fortran/30923] Respecifying USE associated NAMELIST should raise warning by default
2007-02-22 9:21 [Bug fortran/30923] New: Warn by default when respecifiying USE associated NAMELIST burnus at gcc dot gnu dot org
@ 2007-03-18 18:01 ` fxcoudert at gcc dot gnu dot org
2007-03-19 9:07 ` burnus at gcc dot gnu dot org
1 sibling, 0 replies; 3+ messages in thread
From: fxcoudert at gcc dot gnu dot org @ 2007-03-18 18:01 UTC (permalink / raw)
To: gcc-bugs
------- Comment #1 from fxcoudert at gcc dot gnu dot org 2007-03-18 18:01 -------
I'd say the current behaviour is OK. People who want to check their source for
correctness can use either -pedantic or -std=f95/f2003, and they will get the
warning/error. We'd best assume that people who just run "gfortran" want it to
compile their code. This extension is straightforward, so I'd say we do not
change behaviour (this always has a cost).
Put this in WAITING status to clear the bug database a bit. If you feel it
should really be changed, please reopen and confirm. Otherwise, it might be
worth closing as WONTFIX.
--
fxcoudert at gcc dot gnu dot org changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|UNCONFIRMED |WAITING
Summary|Warn by default when |Respecifying USE associated
|respecifiying USE associated|NAMELIST should raise
|NAMELIST |warning by default
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=30923
^ permalink raw reply [flat|nested] 3+ messages in thread
* [Bug fortran/30923] Respecifying USE associated NAMELIST should raise warning by default
2007-02-22 9:21 [Bug fortran/30923] New: Warn by default when respecifiying USE associated NAMELIST burnus at gcc dot gnu dot org
2007-03-18 18:01 ` [Bug fortran/30923] Respecifying USE associated NAMELIST should raise warning by default fxcoudert at gcc dot gnu dot org
@ 2007-03-19 9:07 ` burnus at gcc dot gnu dot org
1 sibling, 0 replies; 3+ messages in thread
From: burnus at gcc dot gnu dot org @ 2007-03-19 9:07 UTC (permalink / raw)
To: gcc-bugs
------- Comment #2 from burnus at gcc dot gnu dot org 2007-03-19 09:07 -------
> > Gfortran and Portland group Fortran accept it by default, while xlf, ifort,
> > NAG f95 and g95 reject it by default.
> I'd say the current behaviour is OK.
Then close as won't fix.
--
burnus at gcc dot gnu dot org changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|WAITING |RESOLVED
Resolution| |WONTFIX
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=30923
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2007-03-19 9:07 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2007-02-22 9:21 [Bug fortran/30923] New: Warn by default when respecifiying USE associated NAMELIST burnus at gcc dot gnu dot org
2007-03-18 18:01 ` [Bug fortran/30923] Respecifying USE associated NAMELIST should raise warning by default fxcoudert at gcc dot gnu dot org
2007-03-19 9:07 ` burnus 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).