Closed
Description
Clang front-end crashes with a segmentation fault while processing C code.
The offending line is a C23 constexpr
very similar to the minimal example I attempted to write below.
I tried to reduce the preprocessed files with creduce
and creduce-clang-crash.py as suggested in how to submit a bug but the script did not emit the listed files (I did notice the repository is deprecated but worth a shot). This is the output of the script. It seems like creduce
itself crashed but I'm not sure.
Output of clang command causing the crash:
clang-crash-output.txt
Crash report:
clang-19-2024-10-16-130218.ips.txt
redacted
I tried to reproduce a minimal example with the following input which did not crash:
#define min(a, b) ((a) < (b) ? (a) : (b))
struct min_st {
int a;
};
void foo(struct min_st *st) {
constexpr int bad_constexpr = min(10, st->a);
}