https://gcc.gnu.org/bugzilla/show_bug.cgi?id=109057
--- Comment #9 from Henry ---
Just to make it clear, I'm not saying this is a bug on GCC.
Im just trying to understand what is happening since this is affecting some of
our benchmarks. Then we can counter with some wit.
Perhaps there is an a
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=109057
--- Comment #6 from Henry ---
Still, why is it then if you change the type to uint32_t the behavior changes?
And why the entire static array is cut out from the object file?
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=109057
--- Comment #4 from Henry ---
Yes it is optimized away.
Note that even in this case the entire static array is optimized away from the
object file.
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=109057
--- Comment #1 from Henry ---
Two caveats:
1. If you add something like `xor %0,%0` inside the assembly text, LUT is not
optimized
inline void DoNotOptimize( uint8_t value) {
asm volatile("xor %0,%0" : : "r,m"(value) : "memory");
}
void fun
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=109057
Bug ID: 109057
Summary: Does GCC interpret assembly when deciding to optimize
away a variable?
Product: gcc
Version: unknown
Status: UNCONFIRMED
Severity: norm
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=109047
Bug ID: 109047
Summary: Harmonize __attribute__((target_clones)) requirement
in function prototype
Product: gcc
Version: unknown
Status: UNCONFIRMED
Severity:
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=106469
--- Comment #6 from Henry ---
> This sanitizer is stupid.
That is an unjust comment on great work from the LLVM team. An unsigned
overflow in user code is almost always a bug due to some oversight, there is no
denying that. Look at Arianne 5 f
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=106469
--- Comment #3 from Henry ---
I agree that technically it is not UB. However I still think it is bad
practice.
So far that single line is the only place in all libstdc++ that triggers that
undefined.
I cannot believe that a developer conscio
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=106469
Bug ID: 106469
Summary: Undefined behavior triggered on Mersenne Twister
engine due to unsigned integer overflow
Product: gcc
Version: 13.0
Status: UNCONFIRMED