This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug fortran/39996] Double typing of function results not detected



------- Comment #1 from janus at gcc dot gnu dot org  2009-05-05 20:35 -------
Extended test case, including six similar cases, of which only the first three
are detected (comment #0 corresponds to case 'E'):

  ! Detected:
  interface
    real function A ()
    end function
  end interface
  real :: A ! Error: Symbol 'a' at (1) already has basic type of REAL

  ! Detected:
  real :: B
  interface
    real function B () ! Error: Function 'b' at (1) already has a type of REAL
    end function
  end interface

  ! Detected:
  interface
    function C ()
      real :: C
    end function
  end interface
  real :: C ! Error: Symbol 'c' at (1) already has basic type of REAL

  ! Not Detected:
  real :: D
  interface
    function D ()
      real :: D
    end function
  end interface

  ! Not Detected:
  interface
    function E () result (s)
      real ::s
    end function
  end interface
  real :: E

  ! Not Detected:
  real :: F
  interface
    function F () result (s)
      real ::s
    end function F
  end interface

end


-- 

janus 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-05-05 20:35:34
               date|                            |


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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]