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

    <tr>
        <th>Summary</th>
        <td>
            [Flang] Compilation error in pop2
        </td>
    </tr>

    <tr>
      <th>Labels</th>
      <td>
            new issue
      </td>
    </tr>

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

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

<pre>
    I have a small reproducer. I get the following error
```
error: Semantic errors in my_test.f90
./my_test.f90:5:12: error: Internal error: Expression analysis failed on: Expr -> ArrayConstructor -> AcSpec
| AcValue -> Expr -> FunctionReference -> Call
| | ProcedureDesignator -> Name = 'trim'
| | ActualArgSpec
| | | ActualArg -> Expr -> Designator -> DataRef -> Name = 'n'

    call sb1((/trim(n)/))
```
in
```
program mn
  character(len=6) :: n
  n = 'hello '
  call sb1((/trim(n)/))
contains                                 
subroutine sb1(nm)
  character(*) :: nm(:)
  print *, len(nm(1))
end subroutine
end program
```
It was previously computing an incorrect result. So it is probably not a regression but pop2 test version used to build and run correctly before the change eb1eb7a144ba.
</pre>
<img width="1px" height="1px" alt="" src="http://email.email.llvm.org/o/eJyVVFmPmzAQ_jXwMlrEERJ44IEmGykvVdWV-loZMwG3xkY-dpt_3zG59pKqIoPtOb75POOh0_2pOcDInhEY2IlJCQZno3vP0SRwgAEduBHhqKXUL0INgMZoE6W7KG2jdXoZy_asKVp4wokpJ_jZ1oJQMJ1-OrQuOdYX4yTK96-FRVvSm-XB_wZ0UA6NYvIuefwzG7RWaAWMFCcrLByZkNiDVlcDeIiKR2iNYaetVtYZz52-SvnTjPzCf7Ol_Q8mPZ6Vd-e9V9xRlO94RIOKXwy2lKG7b3i_Gc2x9wZ3aMWg2C3QVzYhRMUOonzjjJhoeuvZcueZbM3wltAH9Xtq7wPtmGNE82NUdQ-5fIEeHkpsuyzKq2Xsz9Qqsq1pt3zrT6sr1KdiuiyDYRNM6hqEj8wwToUjWIlUlN2aMIlUG-pzM1NXmiPS1YIb1__iyLVyTCgL_3rO5tZ3RnsnFF7w1XSDeks8ytvXpEP4sL4bz0YoB4vZFsIxz2BV9poeqh7uMe-yS9I-TejBwQuzZILPQnsrT8D1NAeAga489RLXxiB31KjWS5fAkwbhQAQX3bGOHJR21M4Gh2urdN7BrOccQrvBM5pF6i11jdOkFbIn7B6MV3CBJ5gOj9rg0v6UGjUgYJdht2HZatWxJMYmW6_Lqlhtsjrum6Kvi5rFTjiJTVR-2UvyicodbIm_kCy007mRww8h0Im9kc3o3GyX3FJl94Nwo-8SOjJtpHy-Tg90uF9Ei7bCWo-WFhR6s4rHBjPG15zxTcH6tMrqtOxzXlRVXtTlKis3sWQdShs4RXmu8AUWCFoTu1g0eZrnWZqVGY2yTspjntVYFnleYr_GKlql9D8TMgk8Em2G2DQLpc4PlpRSWGfvSmZDe-KSgoDPvBu1aX4Lw1RIY0-F1zTHC4lmOcRf-AunZg">