[clang] [clang] Fix crashes when initializing constexpr int* with floating-point (PR #180376)
via cfe-commits
cfe-commits at lists.llvm.org
Sun Feb 8 17:53:08 PST 2026
github-actions[bot] wrote:
<!--PREMERGE ADVISOR COMMENT: Linux-->
# :penguin: Linux x64 Test Results
* 86106 tests passed
* 1256 tests skipped
* 2 tests failed
## Failed Tests
(click on a test name to see its output)
### Clang
<details>
<summary>Clang.AST/ByteCode/constexpr.c</summary>
```
Exit Code: 1
Command Output (stdout):
--
# RUN: at line 1
/home/gha/actions-runner/_work/llvm-project/llvm-project/build/bin/clang -cc1 -internal-isystem /home/gha/actions-runner/_work/llvm-project/llvm-project/build/lib/clang/23/include -nostdsysteminc -std=c23 -verify=ref,both -triple x86_64 -pedantic -Wno-conversion -Wno-constant-conversion -Wno-div-by-zero /home/gha/actions-runner/_work/llvm-project/llvm-project/clang/test/AST/ByteCode/constexpr.c
# executed command: /home/gha/actions-runner/_work/llvm-project/llvm-project/build/bin/clang -cc1 -internal-isystem /home/gha/actions-runner/_work/llvm-project/llvm-project/build/lib/clang/23/include -nostdsysteminc -std=c23 -verify=ref,both -triple x86_64 -pedantic -Wno-conversion -Wno-constant-conversion -Wno-div-by-zero /home/gha/actions-runner/_work/llvm-project/llvm-project/clang/test/AST/ByteCode/constexpr.c
# .---command stderr------------
# | error: diagnostics with 'error' severity expected but not seen:
# | File /home/gha/actions-runner/_work/llvm-project/llvm-project/clang/test/AST/ByteCode/constexpr.c Line 311 (directive at /home/gha/actions-runner/_work/llvm-project/llvm-project/clang/test/AST/ByteCode/constexpr.c:312) 'both-error': constexpr variable 'V84' must be initialized by a constant expression
# | error: diagnostics with 'note' severity expected but not seen:
# | File /home/gha/actions-runner/_work/llvm-project/llvm-project/clang/test/AST/ByteCode/constexpr.c Line 311 (directive at /home/gha/actions-runner/_work/llvm-project/llvm-project/clang/test/AST/ByteCode/constexpr.c:313) 'both-note': this conversion is not allowed in a constant expression
# | 2 errors generated.
# `-----------------------------
# error: command failed with exit status: 1
--
```
</details>
<details>
<summary>Clang.Sema/constexpr.c</summary>
```
Exit Code: 1
Command Output (stdout):
--
# RUN: at line 1
/home/gha/actions-runner/_work/llvm-project/llvm-project/build/bin/clang -cc1 -internal-isystem /home/gha/actions-runner/_work/llvm-project/llvm-project/build/lib/clang/23/include -nostdsysteminc -std=c23 -verify -triple x86_64 -pedantic -Wno-conversion -Wno-constant-conversion -Wno-div-by-zero /home/gha/actions-runner/_work/llvm-project/llvm-project/clang/test/Sema/constexpr.c
# executed command: /home/gha/actions-runner/_work/llvm-project/llvm-project/build/bin/clang -cc1 -internal-isystem /home/gha/actions-runner/_work/llvm-project/llvm-project/build/lib/clang/23/include -nostdsysteminc -std=c23 -verify -triple x86_64 -pedantic -Wno-conversion -Wno-constant-conversion -Wno-div-by-zero /home/gha/actions-runner/_work/llvm-project/llvm-project/clang/test/Sema/constexpr.c
# .---command stderr------------
# | error: 'expected-error' diagnostics expected but not seen:
# | File /home/gha/actions-runner/_work/llvm-project/llvm-project/clang/test/Sema/constexpr.c Line 311 (directive at /home/gha/actions-runner/_work/llvm-project/llvm-project/clang/test/Sema/constexpr.c:312): constexpr variable 'V84' must be initialized by a constant expression
# | error: 'expected-note' diagnostics expected but not seen:
# | File /home/gha/actions-runner/_work/llvm-project/llvm-project/clang/test/Sema/constexpr.c Line 311 (directive at /home/gha/actions-runner/_work/llvm-project/llvm-project/clang/test/Sema/constexpr.c:313): this conversion is not allowed in a constant expression
# | 2 errors generated.
# `-----------------------------
# error: command failed with exit status: 1
--
```
</details>
If these failures are unrelated to your changes (for example tests are broken or flaky at HEAD), please open an issue at https://github.com/llvm/llvm-project/issues and add the `infrastructure` label.
https://github.com/llvm/llvm-project/pull/180376
More information about the cfe-commits
mailing list