Issue 124621
Summary [Flang] Incorrect diagnostic on defined assignment when first argument is unlimited polymorphic
Labels flang:frontend
Assignees
Reporter DanielCChen
    Consider the following code:
```
module m

   type base
      integer(4) :: i = -999
      character(3) :: c = 'xxx'
      contains
         procedure, pass(b) :: U_base
         generic :: assignment(=) => U_base
   end type

   contains

   subroutine U_base ( a, b )
      class(*), intent(out) :: a
      class(base), intent(in)   :: b

   end subroutine

end module
```

Flang currently issues an error as:
```
./t.f:8:38: error: Defined assignment subroutine 'u_base' conflicts with intrinsic assignment
           generic :: assignment(=) => U_base
 ^^^^^^
./t.f:13:15: Declaration of 'u_base'
     subroutine U_base ( a, b )
 ^^^^^^

```

The code seems conforming to me, and all ifort, gfortran and XLF compiled it successfully.
_______________________________________________
llvm-bugs mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs

Reply via email to