public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug fortran/35918]  New: Accepts invalid: INTERFACE <symbol> and REAL <symbol>
@ 2008-04-12 20:10 burnus at gcc dot gnu dot org
  2009-03-29  8:24 ` [Bug fortran/35918] " fxcoudert at gcc dot gnu dot org
                   ` (2 more replies)
  0 siblings, 3 replies; 4+ messages in thread
From: burnus at gcc dot gnu dot org @ 2008-04-12 20:10 UTC (permalink / raw)
  To: gcc-bugs

>From the same thread as PR 35913. Found at
http://groups.google.com/group/comp.lang.fortran/browse_thread/thread/8bc064b25f12ed91

The following should be rejected:

implicit none
real foo
interface
  subroutine foo()
  end subroutine foo
end interface
end

Adding "call foo()" shows that the gfortran thinks that "foo" is a function.
Similarly, the following is invalid -- and it is detected as invalid:

implicit none
real foo
interface
  real function foo() ! Function 'foo' at (1) already has a type of REAL
  end function foo
end interface
end

while the following is essentially identical, but the invalid code is not
detected:

implicit none
real foo
interface
  function foo()
    real foo
  end function foo
end interface
end


-- 
           Summary: Accepts invalid: INTERFACE <symbol> and REAL <symbol>
           Product: gcc
           Version: 4.4.0
            Status: UNCONFIRMED
          Keywords: accepts-invalid
          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=35918


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

* [Bug fortran/35918] Accepts invalid: INTERFACE <symbol> and REAL <symbol>
  2008-04-12 20:10 [Bug fortran/35918] New: Accepts invalid: INTERFACE <symbol> and REAL <symbol> burnus at gcc dot gnu dot org
@ 2009-03-29  8:24 ` fxcoudert at gcc dot gnu dot org
  2009-12-08 21:17 ` dfranke at gcc dot gnu dot org
  2010-05-02  8:43 ` dfranke at gcc dot gnu dot org
  2 siblings, 0 replies; 4+ messages in thread
From: fxcoudert at gcc dot gnu dot org @ 2009-03-29  8:24 UTC (permalink / raw)
  To: gcc-bugs



-- 

fxcoudert at gcc dot gnu dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |NEW
     Ever Confirmed|0                           |1
   Last reconfirmed|0000-00-00 00:00:00         |2009-03-29 08:24:27
               date|                            |


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


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

* [Bug fortran/35918] Accepts invalid: INTERFACE <symbol> and REAL <symbol>
  2008-04-12 20:10 [Bug fortran/35918] New: Accepts invalid: INTERFACE <symbol> and REAL <symbol> burnus at gcc dot gnu dot org
  2009-03-29  8:24 ` [Bug fortran/35918] " fxcoudert at gcc dot gnu dot org
@ 2009-12-08 21:17 ` dfranke at gcc dot gnu dot org
  2010-05-02  8:43 ` dfranke at gcc dot gnu dot org
  2 siblings, 0 replies; 4+ messages in thread
From: dfranke at gcc dot gnu dot org @ 2009-12-08 21:17 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #1 from dfranke at gcc dot gnu dot org  2009-12-08 21:17 -------
All three cases are flagged by current 4.5.0 20091208.

The first one gives
$> gfortran-svn  pr35918.f90
pr35918.f90:2.8:

real foo
        1
Error: FUNCTION attribute conflicts with SUBROUTINE attribute in 'foo' at (1)

which is a little wierd, but "REAL foo" could either refer to a function or a
variable. Thus I'd call this fixed.

Tobias, please close if you agree.


-- 

dfranke at gcc dot gnu dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |dfranke at gcc dot gnu dot
                   |                            |org
             Status|NEW                         |WAITING


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


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

* [Bug fortran/35918] Accepts invalid: INTERFACE <symbol> and REAL <symbol>
  2008-04-12 20:10 [Bug fortran/35918] New: Accepts invalid: INTERFACE <symbol> and REAL <symbol> burnus at gcc dot gnu dot org
  2009-03-29  8:24 ` [Bug fortran/35918] " fxcoudert at gcc dot gnu dot org
  2009-12-08 21:17 ` dfranke at gcc dot gnu dot org
@ 2010-05-02  8:43 ` dfranke at gcc dot gnu dot org
  2 siblings, 0 replies; 4+ messages in thread
From: dfranke at gcc dot gnu dot org @ 2010-05-02  8:43 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #2 from dfranke at gcc dot gnu dot org  2010-05-02 08:42 -------
(In reply to comment #1)
> All three cases are flagged by current 4.5.0 20091208.
> Tobias, please close if you agree.

Closing after 5 months of WAITING. Please reopen if you disagree.


-- 

dfranke at gcc dot gnu dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|WAITING                     |RESOLVED
         Resolution|                            |FIXED


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


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

end of thread, other threads:[~2010-05-02  8:43 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2008-04-12 20:10 [Bug fortran/35918] New: Accepts invalid: INTERFACE <symbol> and REAL <symbol> burnus at gcc dot gnu dot org
2009-03-29  8:24 ` [Bug fortran/35918] " fxcoudert at gcc dot gnu dot org
2009-12-08 21:17 ` dfranke at gcc dot gnu dot org
2010-05-02  8:43 ` dfranke 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).