You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
int b = 208;
[[gnu::noinline]]
void f(int *e, int a) {
*e = !!b;
if (a)
__builtin_trap();
}
int main(void) {
b = 0;
f(&b, 0);
if (b != 0)
__builtin_trap();
}
…init=
This testcase came up in a recent LLVM bug report [0] for DSE vs
-ftrivial-auto-var-init=. Add it to our testsuite given that area
could do with better coverage.
[0] llvm/llvm-project#119646
gcc/testsuite/ChangeLog:
* gcc.dg/torture/dse-trivial-auto-var-init.c: New test.
Co-authored-by: Andrew Pinski <[email protected]>
This code prints 1 at -Os and 0 at -O0/1/2/3:
Compiler Explorer: https://godbolt.org/z/vPvna9s5Y
Bisected to ebe741f which was committed by @haopliu
The text was updated successfully, but these errors were encountered: