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

    <tr>
        <th>Summary</th>
        <td>
            Regression: Clang :: AST/ByteCode/builtin-bit-cast.cpp started to fail on s390x
        </td>
    </tr>

    <tr>
      <th>Labels</th>
      <td>
            clang
      </td>
    </tr>

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

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

<pre>
    I've only been able to reproduce this issue on s390x so far.

The error is:

```
******************** TEST 'Clang :: AST/ByteCode/builtin-bit-cast.cpp' FAILED ********************
Exit Code: 1

Command Output (stderr):
--
/builddir/build/BUILD/llvm-project-7b6db769c3470d75b0d010f16c50582ec3535dea/llvm/redhat-linux-build/bin/clang -cc1 -internal-isystem /builddir/build/BUILD/llvm-project-7b6db769c3470d75b0d010f16c50582ec3535dea/llvm/redhat-linux-build/bin/../lib/clang/22/include -nostdsysteminc -verify=ref,both -std=c++2a -fsyntax-only /builddir/build/BUILD/llvm-project-7b6db769c3470d75b0d010f16c50582ec3535dea/clang/test/AST/ByteCode/builtin-bit-cast.cpp # RUN: at line 1
+ /builddir/build/BUILD/llvm-project-7b6db769c3470d75b0d010f16c50582ec3535dea/llvm/redhat-linux-build/bin/clang -cc1 -internal-isystem /builddir/build/BUILD/llvm-project-7b6db769c3470d75b0d010f16c50582ec3535dea/llvm/redhat-linux-build/bin/../lib/clang/22/include -nostdsysteminc -verify=ref,both -std=c++2a -fsyntax-only /builddir/build/BUILD/llvm-project-7b6db769c3470d75b0d010f16c50582ec3535dea/clang/test/AST/ByteCode/builtin-bit-cast.cpp
error: diagnostics with 'error' severity expected but not seen: 
  File /builddir/build/BUILD/llvm-project-7b6db769c3470d75b0d010f16c50582ec3535dea/clang/test/AST/ByteCode/builtin-bit-cast.cpp Line 563 'ref-error': must be initialized by a constant expression
error: diagnostics with 'error' severity seen but not expected: 
  File /builddir/build/BUILD/llvm-project-7b6db769c3470d75b0d010f16c50582ec3535dea/clang/test/AST/ByteCode/builtin-bit-cast.cpp Line 563: size of '__builtin_bit_cast' source type '__int128' does not match destination type 'S' (16 vs 8 bytes)
error: diagnostics with 'note' severity expected but not seen: 
  File /builddir/build/BUILD/llvm-project-7b6db769c3470d75b0d010f16c50582ec3535dea/clang/test/AST/ByteCode/builtin-bit-cast.cpp Line 563 'ref-note': constexpr bit_cast involving bit-field is not yet supported
  File /builddir/build/BUILD/llvm-project-7b6db769c3470d75b0d010f16c50582ec3535dea/clang/test/AST/ByteCode/builtin-bit-cast.cpp Line 570 'ref-note': initializer of 's' is not a constant expression
error: diagnostics with 'note' severity seen but not expected: 
  File /builddir/build/BUILD/llvm-project-7b6db769c3470d75b0d010f16c50582ec3535dea/clang/test/AST/ByteCode/builtin-bit-cast.cpp Line 570: initializer of 's' is unknown
5 errors generated.
```

I have been able to bisect this to #158509.

A full build log is available at [builder-live.log.gz](https://github.com/user-attachments/files/22500883/builder-live.log.gz)

</pre>
<img width="1" height="1" alt="" src="http://email.email.llvm.org/o/eJzsV02P2zYQ_TX0ZSCDoqwPH3zQriNggaAFks15QZEjiS1NGuTIWefXF5TtpE2LtElRZFsU0EEQh9R7bx7JGRmjGR3ijpV3rNyv5EyTDzuarfGHVe_1effARH1C8M6eoUd0IHuLQB4CHoPXs0KgyUQwMc4pDGKx5c8QPQwyrBlvGW8fJwQMwQcwkRXt5SOr-PXhLRPf_sDjq7ePwER9b6UbIa1ftNC-fWSiuzsT3nuNTHT9bCwZl_WGMiUjrdXxyEQNXfvw-tUe_g4CxttXz4Zg-VPRQn4heO8PB-k0_DjTcSZgoomkMQQmthcRsmyhvkDT2oTbawL-7uH1nonO2tMhOwb_EyrK6r7SfV1tVbGpua7Lnmue8yGvVMnLRqAqyqLUKK_zmOgC6klSZo2bn7Pb2r1xTHRqUStTKofMOMLgpM1MPEfCA3wvUOt1CjP9DR8TnRBMdMYpO2uEzPlI-g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