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

    <tr>
        <th>Summary</th>
        <td>
            tanf test fails with gcc-12.2
        </td>
    </tr>

    <tr>
      <th>Labels</th>
      <td>
            libc
      </td>
    </tr>

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

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

<pre>
    Fails with the following log:

```
[ RUN      ] LlvmLibcTanfTest.SpecificBitPatterns
/usr/local/google/home/sivachandra/llvm-project/libc/test/src/math/tanf_test.cpp:119: FAILURE
Failed to match __llvm_libc::tanf(x) against __llvm_libc::testing::mpfr::get_mpfr_matcher<mpfr::Operation::Tan>( x, __llvm_libc::tanf(x), 0.5, mpfr::RoundingMode::Downward).
Match value not within tolerance value of MPFR result:
  Input decimal: 1.07908272743225097656250000000000000000000000000000
     Input bits: 0x3f8a1f62, (S | E | M) = (0 | 0x7f | 0x0a1f62)

  Match decimal: 1.86709535121917724609375000000000000000000000000000
     Match bits: 0x3feefcfb, (S | E | M) = (0 | 0x7f | 0x6efcfb)

    MPFR result: 1.86709523200988769531250000000000000000000000000000
   MPFR rounded: 0x3feefcfa, (S | E | M) = (0 | 0x7f | 0x6efcfa)

      ULP error: 1.000000
/usr/local/google/home/sivachandra/llvm-project/libc/test/src/math/tanf_test.cpp:119: FAILURE
Failed to match __llvm_libc::tanf(x) against __llvm_libc::testing::mpfr::get_mpfr_matcher<mpfr::Operation::Tan>( x, __llvm_libc::tanf(x), 0.5, mpfr::RoundingMode::TowardZero).
Match value not within tolerance value of MPFR result:
  Input decimal: 1.07908272743225097656250000000000000000000000000000
     Input bits: 0x3f8a1f62, (S | E | M) = (0 | 0x7f | 0x0a1f62)

  Match decimal: 1.86709535121917724609375000000000000000000000000000
     Match bits: 0x3feefcfb, (S | E | M) = (0 | 0x7f | 0x6efcfb)

    MPFR result: 1.86709523200988769531250000000000000000000000000000
   MPFR rounded: 0x3feefcfa, (S | E | M) = (0 | 0x7f | 0x6efcfa)

      ULP error: 1.000000
/usr/local/google/home/sivachandra/llvm-project/libc/test/src/math/tanf_test.cpp:121: FAILURE
Failed to match __llvm_libc::tanf(-x) against __llvm_libc::testing::mpfr::get_mpfr_matcher<mpfr::Operation::Tan>( -x, __llvm_libc::tanf(-x), 0.5, mpfr::RoundingMode::Upward).
Match value not within tolerance value of MPFR result:
  Input decimal: -1.07908272743225097656250000000000000000000000000000
     Input bits: 0xbf8a1f62, (S | E | M) = (1 | 0x7f | 0x0a1f62)

  Match decimal: -1.86709535121917724609375000000000000000000000000000
     Match bits: 0xbfeefcfb, (S | E | M) = (1 | 0x7f | 0x6efcfb)

    MPFR result: -1.86709523200988769531250000000000000000000000000000
   MPFR rounded: 0xbfeefcfa, (S | E | M) = (1 | 0x7f | 0x6efcfa)

      ULP error: 1.000000
/usr/local/google/home/sivachandra/llvm-project/libc/test/src/math/tanf_test.cpp:121: FAILURE
Failed to match __llvm_libc::tanf(-x) against __llvm_libc::testing::mpfr::get_mpfr_matcher<mpfr::Operation::Tan>( -x, __llvm_libc::tanf(-x), 0.5, mpfr::RoundingMode::TowardZero).
Match value not within tolerance value of MPFR result:
  Input decimal: -1.07908272743225097656250000000000000000000000000000
     Input bits: 0xbf8a1f62, (S | E | M) = (1 | 0x7f | 0x0a1f62)

  Match decimal: -1.86709535121917724609375000000000000000000000000000
     Match bits: 0xbfeefcfb, (S | E | M) = (1 | 0x7f | 0x6efcfb)

    MPFR result: -1.86709523200988769531250000000000000000000000000000
   MPFR rounded: 0xbfeefcfa, (S | E | M) = (1 | 0x7f | 0x6efcfa)

      ULP error: 1.000000
[  FAILED  ] LlvmLibcTanfTest.SpecificBitPatterns

```
</pre>
<img width="1px" height="1px" alt="" src="http://email.email.llvm.org/o/eJzsmN9uozgUxp_GubGCzHH4d8FFOinSSO1u1Wlv9iYyxoBXjo1s03bffmVIp-lMFa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