<table border="1" cellspacing="0" cellpadding="8">
    <tr>
        <th>Issue</th>
        <td>
            <a href=https://github.com/llvm/llvm-project/issues/153132>153132</a>
        </td>
    </tr>

    <tr>
        <th>Summary</th>
        <td>
            [flang] Defined assignment issue.
        </td>
    </tr>

    <tr>
      <th>Labels</th>
      <td>
            flang:frontend
      </td>
    </tr>

    <tr>
      <th>Assignees</th>
      <td>
      </td>
    </tr>

    <tr>
      <th>Reporter</th>
      <td>
          DanielCChen
      </td>
    </tr>
</table>

<pre>
    Consider the following reducer:
```
module m
    type base
        real, allocatable :: data
        contains

        procedure :: uncommonAssgn
 generic :: assignment(=) => uncommonAssgn
    end type

 contains

    !! this is rather unusual way to do assignment: choose the larger value
    !between LHS and RHS for components
    subroutine uncommonAssgn (b1, b2)
        class(base), intent(inout) :: b1
 class(base), intent(in) :: b2

print*, b1%data                     !! Should print 10.1
    end subroutine
end module

module m1
use m
 type container
        type(base) data
    end type

    contains

 subroutine assgnCo (co1, co2)
        type(container), allocatable :: co1
 type(container) co2

        co1 = co2
    end subroutine
end module

program dummyArg009
use m1
    type(container), allocatable :: co1, co2

    allocate (co1,co2)

    co1%data%data = 10.1

    !! test 2
    call assgnCo (co1, co2)
end
```

Flang's output
```
> a.out
 0.
```

Expected output:
```
>a.out
10.1
```


</pre>
<img width="1" height="1" alt="" src="http://email.email.llvm.org/o/eJyMlc2O4jgQx5_GXEqDbIcAOeSQhUZz2NP2Ezh2kXjl2JE_urfffuWQQBpGo4mQIuz6_NXfjghBdxaxJuVfpDxvRIq98_VZWI3mdOrRblqnvuqTs0Er9BB7hKszxn1q24FHlSR6UjSENmRP5x9tBqeSQRgIbQAA4teI0IqA8__8eBSG8BMIY5wUUbQGIQcqGlAiipWldDYKbUPO8VgdvZOokr97JSvdMDjbhNDZbNihRa_lsn_rdUAbCT-S4kx4BflVvL26AgBaNdU9Z30tgnBGOIPY6wA6gBexRw_JppCEgU_xBdGBcuu8RQOydy7gxNEI36GHD2ESPmK2GD8RLfz98x2EVfDPz3e4Og_SDaOzaGOYbUNqvUtRW_xePxB-bFlG23LCqzVII0LIu3kSvMom2sYbEG1dijckE62WTV3_1mNtzm9gRq_zZjOlZ4SXeZbwq2fG9967ZBRMfsDolq3wPzoktMkLN1ndMi0Syw4pzFqbhDaPCv2q9WmS9z7WCnua86veVpxF5ntymbB0E2LpnhjPiR413Kj9QuU5wlzyk8MU9ZvYpWNZq_PGH_EZveu8GEClYfhqfEdptZBiq2P557XO3d7rms3wQeMO4w5yUcAihNzDPOSnU4QhwtKbFMb8jjVa9XTfENpcjLAd4YcALsUxxWeL4g3E1k3rQLev_m__jSgjqsX95U4jxdsSYGnhe4SNqgtVFZXYYM0O5a46MLajm77e7Y9FdThc1VWpA8Pjodgf9we5q_Yor2152OiaU17SI-O0KCtKt1yWbJf3y4JX5Z6RHcVBaLM15mPYOt9tdAgJa1YWrOAbI1o0YbrEOb9OIIrm6l0-qopwnq92X2ffH23qAtlRo0MMj2hRRzN9BG7O5RnOeNUW1er2ginldpO8qfsYx5AR8Qvhl07HPrVb6QbCLznm_Poxevcvykj4ZfINhF_mij9q_n8AAAD__8jg514">