public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug fortran/25052]  New: better diagnostic needed
@ 2005-11-26 17:46 jv244 at cam dot ac dot uk
  2005-11-26 19:10 ` [Bug fortran/25052] intrinsic name cannot be a common block name fxcoudert at gcc dot gnu dot org
                   ` (2 more replies)
  0 siblings, 3 replies; 4+ messages in thread
From: jv244 at cam dot ac dot uk @ 2005-11-26 17:46 UTC (permalink / raw)
  To: gcc-bugs

using GNU Fortran 95 (GCC) 4.1.0 20051126 (prerelease)  with '-g -pedantic
-std=f95', I get a bad / no diagnostic for the following invalid code:

REAL*8 :: I,J
COMMON /SIN/ I ! error
COMMON /COS/ J ! is OK
write(6,*) SIN(I),DCOS(J)
END


-- 
           Summary: better diagnostic needed
           Product: gcc
           Version: 4.1.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: fortran
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: jv244 at cam dot ac dot uk


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=25052


^ permalink raw reply	[flat|nested] 4+ messages in thread

* [Bug fortran/25052] intrinsic name cannot be a common block name
  2005-11-26 17:46 [Bug fortran/25052] New: better diagnostic needed jv244 at cam dot ac dot uk
@ 2005-11-26 19:10 ` fxcoudert at gcc dot gnu dot org
  2006-02-26 19:49 ` pinskia at gcc dot gnu dot org
  2007-06-02 23:20 ` jvdelisle at gcc dot gnu dot org
  2 siblings, 0 replies; 4+ messages in thread
From: fxcoudert at gcc dot gnu dot org @ 2005-11-26 19:10 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #1 from fxcoudert at gcc dot gnu dot org  2005-11-26 19:09 -------
gfortran doesn't see the conflict here. As a matter of fact, neither Intel nor
Portland do issue an error.

## g95 ##
In file foo.f90:4

write(6,*) SIN(I),DCOS(J)
              1
Error: COMMON block 'sin' at (1) is also an intrinsic function
## Intel ##
## Portland ##
## Sun ##

write(6,*) SIN(I),DCOS(J)
           ^
"foo.f90", Line = 4, Column = 12: ERROR: "SIN" is a common block name and is
also declared as an intrinsic procedure.


-- 

fxcoudert at gcc dot gnu dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |NEW
     Ever Confirmed|0                           |1
           Keywords|                            |accepts-invalid
   Last reconfirmed|0000-00-00 00:00:00         |2005-11-26 19:09:58
               date|                            |
            Summary|better diagnostic needed    |intrinsic name cannot be a
                   |                            |common block name


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=25052


^ permalink raw reply	[flat|nested] 4+ messages in thread

* [Bug fortran/25052] intrinsic name cannot be a common block name
  2005-11-26 17:46 [Bug fortran/25052] New: better diagnostic needed jv244 at cam dot ac dot uk
  2005-11-26 19:10 ` [Bug fortran/25052] intrinsic name cannot be a common block name fxcoudert at gcc dot gnu dot org
@ 2006-02-26 19:49 ` pinskia at gcc dot gnu dot org
  2007-06-02 23:20 ` jvdelisle at gcc dot gnu dot org
  2 siblings, 0 replies; 4+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2006-02-26 19:49 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #2 from pinskia at gcc dot gnu dot org  2006-02-26 19:46 -------
On the mainline and in 4.1.0, we get:
 In file t.f90:4

write(6,*) SIN(I),DCOS(J)
         1
 In file t.f90:2

COMMON /SIN/ I ! error
           2
Error: Global name 'sin' at (1) is already being used as a COMMON at (2)

But I think we should error out sooner.


-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=25052


^ permalink raw reply	[flat|nested] 4+ messages in thread

* [Bug fortran/25052] intrinsic name cannot be a common block name
  2005-11-26 17:46 [Bug fortran/25052] New: better diagnostic needed jv244 at cam dot ac dot uk
  2005-11-26 19:10 ` [Bug fortran/25052] intrinsic name cannot be a common block name fxcoudert at gcc dot gnu dot org
  2006-02-26 19:49 ` pinskia at gcc dot gnu dot org
@ 2007-06-02 23:20 ` jvdelisle at gcc dot gnu dot org
  2 siblings, 0 replies; 4+ messages in thread
From: jvdelisle at gcc dot gnu dot org @ 2007-06-02 23:20 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #3 from jvdelisle at gcc dot gnu dot org  2007-06-02 23:20 -------
Closing.  I get an error message that seems OK


-- 

jvdelisle at gcc dot gnu dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |RESOLVED
         Resolution|                            |WORKSFORME


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=25052


^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2007-06-02 23:20 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2005-11-26 17:46 [Bug fortran/25052] New: better diagnostic needed jv244 at cam dot ac dot uk
2005-11-26 19:10 ` [Bug fortran/25052] intrinsic name cannot be a common block name fxcoudert at gcc dot gnu dot org
2006-02-26 19:49 ` pinskia at gcc dot gnu dot org
2007-06-02 23:20 ` jvdelisle 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).