https://gcc.gnu.org/bugzilla/show_bug.cgi?id=100776

--- Comment #1 from Mohd Furquan <furquan2011 at gmail dot com> ---
Renaming result variable alleviates the problem. The following code compiles
without complain:

```
module vector                                                                   
  type :: vec(dimen)                                                            
    integer,len :: dimen                                                        
    real        :: e(dimen)                                                     
  end type vec                                                                  

contains                                                                        
  function double(a) result (d)                                                 
    type(vec(*)),intent(in) :: a                                                
    type(vec(a%dimen))      :: d                                                

    d%e = 2.*a%e                                                                
  end function double                                                           
end module vector
```

Reply via email to