public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug fortran/17379] New: Generic functions not resolved
@ 2004-09-09 16:21 CARendleman at lbl dot gov
  2004-09-09 17:02 ` [Bug fortran/17379] " pinskia at gcc dot gnu dot org
                   ` (11 more replies)
  0 siblings, 12 replies; 13+ messages in thread
From: CARendleman at lbl dot gov @ 2004-09-09 16:21 UTC (permalink / raw)
  To: gcc-bugs

$ cat generic_bug.f90 
module vector_i_module 
 
  implicit none 
 
  type vector_i 
     integer :: size = 0 
  end type vector_i 
 
  interface size 
     module procedure vector_size_i 
  end interface size 
 
contains 
 
  function vector_size_i(d) result(r) 
    integer :: r 
    type(vector_i), intent(in) :: d 
    r = d%size 
  end function vector_size_i 
 
  subroutine vector_reverse_i(d) 
    type(vector_i), intent(inout) :: d 
    integer :: i,n 
    n = size(d) 
  end subroutine vector_reverse_i 
 
end module vector_i_module 
$ gfortran generic_bug.f90 
 In file generic_bug.f90:24 
 
    n = size(d) 
           1 
Error: Symbol 'size' at (1) has no IMPLICIT type

-- 
           Summary: Generic functions not resolved
           Product: gcc
           Version: 3.5.0
            Status: UNCONFIRMED
          Severity: critical
          Priority: P2
         Component: fortran
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: CARendleman at lbl dot gov
                CC: gcc-bugs at gcc dot gnu dot org
 GCC build triplet: GNU Fortran 95 (GCC 3.5.0 20040909 (experimental))


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


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

* [Bug fortran/17379] Generic functions not resolved
  2004-09-09 16:21 [Bug fortran/17379] New: Generic functions not resolved CARendleman at lbl dot gov
@ 2004-09-09 17:02 ` pinskia at gcc dot gnu dot org
  2004-09-18 11:26 ` tobi at gcc dot gnu dot org
                   ` (10 subsequent siblings)
  11 siblings, 0 replies; 13+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2004-09-09 17:02 UTC (permalink / raw)
  To: gcc-bugs



-- 
           What    |Removed                     |Added
----------------------------------------------------------------------------
           Severity|critical                    |normal
  GCC build triplet|GNU Fortran 95 (GCC 3.5.0   |
                   |20040909 (experimental))    |


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


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

* [Bug fortran/17379] Generic functions not resolved
  2004-09-09 16:21 [Bug fortran/17379] New: Generic functions not resolved CARendleman at lbl dot gov
  2004-09-09 17:02 ` [Bug fortran/17379] " pinskia at gcc dot gnu dot org
@ 2004-09-18 11:26 ` tobi at gcc dot gnu dot org
  2004-09-23 19:43 ` tobi at gcc dot gnu dot org
                   ` (9 subsequent siblings)
  11 siblings, 0 replies; 13+ messages in thread
From: tobi at gcc dot gnu dot org @ 2004-09-18 11:26 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From tobi at gcc dot gnu dot org  2004-09-18 11:25 -------
Confirmed. It looks like an issue with setting up sibling namespaces, but I
haven't looked at what the compiler actually does.

-- 
           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |NEW
     Ever Confirmed|                            |1
   Last reconfirmed|0000-00-00 00:00:00         |2004-09-18 11:26:00
               date|                            |


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


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

* [Bug fortran/17379] Generic functions not resolved
  2004-09-09 16:21 [Bug fortran/17379] New: Generic functions not resolved CARendleman at lbl dot gov
  2004-09-09 17:02 ` [Bug fortran/17379] " pinskia at gcc dot gnu dot org
  2004-09-18 11:26 ` tobi at gcc dot gnu dot org
@ 2004-09-23 19:43 ` tobi at gcc dot gnu dot org
  2004-09-23 19:44 ` tobi at gcc dot gnu dot org
                   ` (8 subsequent siblings)
  11 siblings, 0 replies; 13+ messages in thread
From: tobi at gcc dot gnu dot org @ 2004-09-23 19:43 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From tobi at gcc dot gnu dot org  2004-09-23 19:43 -------


*** This bug has been marked as a duplicate of 16940 ***

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


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


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

* [Bug fortran/17379] Generic functions not resolved
  2004-09-09 16:21 [Bug fortran/17379] New: Generic functions not resolved CARendleman at lbl dot gov
                   ` (2 preceding siblings ...)
  2004-09-23 19:43 ` tobi at gcc dot gnu dot org
@ 2004-09-23 19:44 ` tobi at gcc dot gnu dot org
  2004-09-23 19:46 ` tobi at gcc dot gnu dot org
                   ` (7 subsequent siblings)
  11 siblings, 0 replies; 13+ messages in thread
From: tobi at gcc dot gnu dot org @ 2004-09-23 19:44 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From tobi at gcc dot gnu dot org  2004-09-23 19:44 -------
Well, I think duplicate is to harsh. The relationship is more likely a
dependency, there might be additional issues lurking.

-- 
           What    |Removed                     |Added
----------------------------------------------------------------------------
  BugsThisDependsOn|                            |16940
             Status|RESOLVED                    |REOPENED
         Resolution|DUPLICATE                   |


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


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

* [Bug fortran/17379] Generic functions not resolved
  2004-09-09 16:21 [Bug fortran/17379] New: Generic functions not resolved CARendleman at lbl dot gov
                   ` (3 preceding siblings ...)
  2004-09-23 19:44 ` tobi at gcc dot gnu dot org
@ 2004-09-23 19:46 ` tobi at gcc dot gnu dot org
  2004-09-23 20:10 ` pinskia at gcc dot gnu dot org
                   ` (6 subsequent siblings)
  11 siblings, 0 replies; 13+ messages in thread
From: tobi at gcc dot gnu dot org @ 2004-09-23 19:46 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From tobi at gcc dot gnu dot org  2004-09-23 19:46 -------
*** Bug 17630 has been marked as a duplicate of this bug. ***

-- 
           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |giannozz at nest dot sns dot
                   |                            |it


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


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

* [Bug fortran/17379] Generic functions not resolved
  2004-09-09 16:21 [Bug fortran/17379] New: Generic functions not resolved CARendleman at lbl dot gov
                   ` (4 preceding siblings ...)
  2004-09-23 19:46 ` tobi at gcc dot gnu dot org
@ 2004-09-23 20:10 ` pinskia at gcc dot gnu dot org
  2004-09-27 10:49 ` matthew dot amos at baesystems dot com
                   ` (5 subsequent siblings)
  11 siblings, 0 replies; 13+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2004-09-23 20:10 UTC (permalink / raw)
  To: gcc-bugs



-- 
           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|REOPENED                    |NEW


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


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

* [Bug fortran/17379] Generic functions not resolved
  2004-09-09 16:21 [Bug fortran/17379] New: Generic functions not resolved CARendleman at lbl dot gov
                   ` (5 preceding siblings ...)
  2004-09-23 20:10 ` pinskia at gcc dot gnu dot org
@ 2004-09-27 10:49 ` matthew dot amos at baesystems dot com
  2005-01-04 13:41 ` Thomas dot Koenig at online dot de
                   ` (4 subsequent siblings)
  11 siblings, 0 replies; 13+ messages in thread
From: matthew dot amos at baesystems dot com @ 2004-09-27 10:49 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From matthew dot amos at baesystems dot com  2004-09-27 10:49 -------
I have some code which triggers the same bug (I think). If it helps, I have
reproduced the code here. The funny thing is; it works if you replace "length"
with "length_R4" in normalise_R4.

module module_vec3d

  implicit none

! Public procedures
  private
  public :: normalise, length

! Module constants
  integer, parameter :: SP = selected_real_kind(6)
  integer, parameter :: DP = selected_real_kind(12)

! Vector length
  INTERFACE length
     MODULE PROCEDURE length_R4
  END INTERFACE

! Vector normalise
  INTERFACE normalise
     MODULE PROCEDURE normalise_R4
  END INTERFACE

CONTAINS

  FUNCTION length_R4 (x) result (y)
    real(SP) :: y
    real(SP), intent(in) :: x(3)
    y = sqrt(x(1)**2 + x(2)**2 + x(3)**2)
  END FUNCTION length_R4

  FUNCTION normalise_R4 (x) result (y)
    real(SP) :: y(3)
    real(SP), intent(in) :: x(3)
    y = x / length(x)
  END FUNCTION normalise_R4

END MODULE module_vec3d


-- 


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


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

* [Bug fortran/17379] Generic functions not resolved
  2004-09-09 16:21 [Bug fortran/17379] New: Generic functions not resolved CARendleman at lbl dot gov
                   ` (6 preceding siblings ...)
  2004-09-27 10:49 ` matthew dot amos at baesystems dot com
@ 2005-01-04 13:41 ` Thomas dot Koenig at online dot de
  2005-01-05 18:14 ` CARendleman at lbl dot gov
                   ` (3 subsequent siblings)
  11 siblings, 0 replies; 13+ messages in thread
From: Thomas dot Koenig at online dot de @ 2005-01-04 13:41 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From Thomas dot Koenig at online dot de  2005-01-04 13:41 -------
The problem appears to be related to the fact that "length"
and "size" are both intrinsics.

If you declare "length" to be external, with the following
patch:

$ diff -u vec3d.f90 vec3d-works.f90
--- vec3d.f90   2005-01-04 14:43:07.000000000 +0100
+++ vec3d-works.f90     2005-01-04 14:43:01.000000000 +0100
@@ -5,6 +5,7 @@
 ! Public procedures
   private
   public :: normalise, length
+  external :: length

 ! Module constants
   integer, parameter :: SP = selected_real_kind(6)

compilation works fine.

-- 


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


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

* [Bug fortran/17379] Generic functions not resolved
  2004-09-09 16:21 [Bug fortran/17379] New: Generic functions not resolved CARendleman at lbl dot gov
                   ` (7 preceding siblings ...)
  2005-01-04 13:41 ` Thomas dot Koenig at online dot de
@ 2005-01-05 18:14 ` CARendleman at lbl dot gov
  2005-07-22 19:15 ` paulthomas2 at wanadoo dot fr
                   ` (2 subsequent siblings)
  11 siblings, 0 replies; 13+ messages in thread
From: CARendleman at lbl dot gov @ 2005-01-05 18:14 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From CARendleman at lbl dot gov  2005-01-05 18:14 -------
Subject: Re:  Generic functions not resolved

I'm sure your not offering this as a 'fix' because it results in 
'conflicting attributes or multiple declarations of a name'
or 'name already used as generic name' errors with other compilers.

Thomas dot Koenig at online dot de wrote:

>------- Additional Comments From Thomas dot Koenig at online dot de  2005-01-04 13:41 -------
>The problem appears to be related to the fact that "length"
>and "size" are both intrinsics.
>
>If you declare "length" to be external, with the following
>patch:
>
>$ diff -u vec3d.f90 vec3d-works.f90
>--- vec3d.f90   2005-01-04 14:43:07.000000000 +0100
>+++ vec3d-works.f90     2005-01-04 14:43:01.000000000 +0100
>@@ -5,6 +5,7 @@
> ! Public procedures
>   private
>   public :: normalise, length
>+  external :: length
>
> ! Module constants
>   integer, parameter :: SP = selected_real_kind(6)
>
>compilation works fine.
>
>  
>




-- 


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


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

* [Bug fortran/17379] Generic functions not resolved
  2004-09-09 16:21 [Bug fortran/17379] New: Generic functions not resolved CARendleman at lbl dot gov
                   ` (8 preceding siblings ...)
  2005-01-05 18:14 ` CARendleman at lbl dot gov
@ 2005-07-22 19:15 ` paulthomas2 at wanadoo dot fr
  2005-08-12 21:47 ` tkoenig at gcc dot gnu dot org
  2005-08-23  1:54 ` pinskia at gcc dot gnu dot org
  11 siblings, 0 replies; 13+ messages in thread
From: paulthomas2 at wanadoo dot fr @ 2005-07-22 19:15 UTC (permalink / raw)
  To: gcc-bugs



-- 
Bug 17379 depends on bug 16940, which changed state.

Bug 16940 Summary: Failure to perform host association correctly
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=16940

           What    |Old Value                   |New Value
----------------------------------------------------------------------------
             Status|NEW                         |RESOLVED
         Resolution|                            |FIXED

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


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

* [Bug fortran/17379] Generic functions not resolved
  2004-09-09 16:21 [Bug fortran/17379] New: Generic functions not resolved CARendleman at lbl dot gov
                   ` (9 preceding siblings ...)
  2005-07-22 19:15 ` paulthomas2 at wanadoo dot fr
@ 2005-08-12 21:47 ` tkoenig at gcc dot gnu dot org
  2005-08-23  1:54 ` pinskia at gcc dot gnu dot org
  11 siblings, 0 replies; 13+ messages in thread
From: tkoenig at gcc dot gnu dot org @ 2005-08-12 21:47 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From tkoenig at gcc dot gnu dot org  2005-08-12 21:47 -------
This is fixed on mainline and on 4.0.

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


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


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

* [Bug fortran/17379] Generic functions not resolved
  2004-09-09 16:21 [Bug fortran/17379] New: Generic functions not resolved CARendleman at lbl dot gov
                   ` (10 preceding siblings ...)
  2005-08-12 21:47 ` tkoenig at gcc dot gnu dot org
@ 2005-08-23  1:54 ` pinskia at gcc dot gnu dot org
  11 siblings, 0 replies; 13+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2005-08-23  1:54 UTC (permalink / raw)
  To: gcc-bugs



-- 
           What    |Removed                     |Added
----------------------------------------------------------------------------
   Target Milestone|---                         |4.0.2


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


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

end of thread, other threads:[~2005-08-23  1:54 UTC | newest]

Thread overview: 13+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2004-09-09 16:21 [Bug fortran/17379] New: Generic functions not resolved CARendleman at lbl dot gov
2004-09-09 17:02 ` [Bug fortran/17379] " pinskia at gcc dot gnu dot org
2004-09-18 11:26 ` tobi at gcc dot gnu dot org
2004-09-23 19:43 ` tobi at gcc dot gnu dot org
2004-09-23 19:44 ` tobi at gcc dot gnu dot org
2004-09-23 19:46 ` tobi at gcc dot gnu dot org
2004-09-23 20:10 ` pinskia at gcc dot gnu dot org
2004-09-27 10:49 ` matthew dot amos at baesystems dot com
2005-01-04 13:41 ` Thomas dot Koenig at online dot de
2005-01-05 18:14 ` CARendleman at lbl dot gov
2005-07-22 19:15 ` paulthomas2 at wanadoo dot fr
2005-08-12 21:47 ` tkoenig at gcc dot gnu dot org
2005-08-23  1:54 ` 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).