Hello,
we are in the process of making our project GCC compatible.
With LTO enabled, linking takes remarkably long and these warnings show:
../src/xenia/base/memory.h: In function ‘copy_and_swap.constprop’:
../src/xenia/base/memory.cc:105: warning: iteration 4611686018427387903
invokes undefined behavior [-Waggressive-loop-optimizations]
105 | dest[i] = byte_swap(src[i]);
|
../src/xenia/base/memory.cc:104: note: within this loop
104 | for (; i < count; ++i) { // handle residual elements
|
../src/xenia/base/memory.cc:124: warning: iteration 4611686018427387903
invokes undefined behavior [-Waggressive-loop-optimizations]
124 | dest[i] = byte_swap(src[i]);
|
../src/xenia/base/memory.cc:123: note: within this loop
123 | for (; i < count; ++i) { // handle residual elements
|
It's the first time we see an issue with these functions. They include
vector intrinsics.
How can I debug this issue? How to get the stack trace of the call GCC
is trying to optimize?
Yours sincerely,
Joel Linn