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

    <tr>
        <th>Summary</th>
        <td>
            [Flang] Intrinsics ACOS, ASIN, ATAN, AINT, ANINT, COS, SIN, NINT, RANDOM_NUMBER are not implemented for 128-bit REAL
        </td>
    </tr>

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

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

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

<pre>
    Intrinsics ACOS, ASIN, ATAN, AINT, ANINT, COS, SIN, NINT, RANDOM_NUMBER are not implemented for 128-bit REAL

cat -n repro.F90
     1  Module m_real128
     2    Integer, Parameter :: qp = Selected_Real_Kind(28)
 3    Real(qp), Parameter :: qone = 1.0, qtwo = 2.0, qthree= 3.0, qfour = 4.0
     4    Real(qp), Parameter :: q23 = qthree**(qone/qtwo)
     5 Integer, Parameter :: iqnint(3) = NINT([qone, -qtwo, qone/qfour])
     6 Real(qp), Parameter :: aqnint(3) = ANINT([qone, -qtwo, qone/qfour])
 7    Real(qp), Parameter :: qcos(3) = COS([qone, -qtwo, qone/qtwo])
     8 Real(qp), Parameter :: qsin(3) = SIN([qone, -qtwo, qone/qtwo])
     9 Real(qp), Parameter :: qtan(3) = TAN([qone, -qtwo, qone/qtwo])
    10 Real(qp), Parameter :: qacos(3) = ACOS([qone/qtwo, -qtwo/qthree, qone/qthree])
    11    Real(qp), Parameter :: qasin(3) = ASIN([qone/qtwo, -qtwo/qthree, qone/qthree])
    12    Real(qp), Parameter :: qatan(3) = ATAN([qone, -qtwo, qone/qtwo])
    13  End Module m_real128
    14 Program test_real128
    15    Use m_real128
    16    Real(qp) :: x(3)
    17    Character(100) ::str
    18    Print *, qone, qtwo, qthree
    19    Print *, qthree**(qone/qtwo)
    20    Call Random_Number(x)
    21    Print 3, x
    22    str='1.0 -2.0 0.25'; Read(str,*) x
    23
    24    Print 4, iqnint
    25    Print 4, NINT(x)
    26    Print 3, aqnint
    27    Print 3, ANINT(x)
    28 Print 3,qsin
    29    Print 3,SIN(x)
    30    Print 3,qcos
 31    Print 3,COS(x)
    32    Print 3,qtan
    33    Print 3,TAN(x)
    34
    35    x = [qone/qtwo, -qtwo/qthree, qone/qthree]
    36    Print 3,qasin
    37    Print 3,ASIN(x)
 38    Print 3,qacos
    39    Print 3,ACOS(x)
    40    x = [qone, -qtwo, qone/qtwo]
    41    Print 3,qatan
    42    Print 3,ATAN(x)
 43  3 Format (3F40.30)
    44  4 Format (3I40)
    45  End Program test_real128

$ flang-new repro.F90
error: loc("/home/repro.F90":25:12): not yet implemented: no math runtime available for 'NINT(REAL(KIND=16))'
error: loc("/home/repro.F90":27:12): not yet implemented: no math runtime available for 'ANINT(REAL(KIND=16))'
error: loc("/home/repro.F90":29:11): not yet implemented: no math runtime available for 'SIN(REAL(KIND=16))'
error: loc("/home/repro.F90":31:11): not yet implemented: no math runtime available for 'COS(REAL(KIND=16))'
error: loc("/home/repro.F90":33:11): not yet implemented: no math runtime available for 'TAN(REAL(KIND=16))'
error: loc("/home/repro.F90":37:11): not yet implemented: no math runtime available for 'ASIN(REAL(KIND=16))'
error: loc("/home/repro.F90":39:11): not yet implemented: no math runtime available for 'ACOS(REAL(KIND=16))'
error: loc("/home/repro.F90":42:11): not yet implemented: no math runtime available for 'ATAN(REAL(KIND=16))'

Attached a reproducer with this ticket.
</pre>
<img width="1px" height="1px" alt="" src="http://email.email.llvm.org/o/eJzEV11v4ygU_TXkBcXCFxzbD3mgyViKZidTtTPPFXFowtYfKSbTzr9fgR3ZoZlu2rW0UYVtuNxzOPieYtE0aldJOUfRDYqWE3E0-1rPn5QW1ZM5TDb19vd8VRmtqkblDeaL7_cIFpjfr9bu-oO319X6h7uuu5surgs79d7x9fL7t4f1z283X-6w0BJXtcGqPBSylJWRW_xYaxxCMt0og---8L8QWSLC2zYXBk8rrOVB10G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