[Bug target/95908] New: [AArch64] wrong code with ILP32 and -fwrapv
markus at oberhumer dot com
gcc-bugzilla@gcc.gnu.org
Fri Jun 26 11:33:36 GMT 2020
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=95908
Bug ID: 95908
Summary: [AArch64] wrong code with ILP32 and -fwrapv
Product: gcc
Version: unknown
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: target
Assignee: unassigned at gcc dot gnu.org
Reporter: markus at oberhumer dot com
Target Milestone: ---
[this issue has been extraced from bug 95903]
Link at Compiler Explorer: https://gcc.godbolt.org/z/mRf2kd
The function below does compute the address in 64 (and not in 32) bits, which
seems wrong when using "-fwrapv -fwrapv-pointer".
As discussed in bug 95903 some feedback from the target maintainer
would be welcome.
// arm64-linux-gcc -mabi=ilp32 -O2 -fwrapv -fwrapv-pointer
char get_byte(const char* ptr, int off)
{
off += 2147483647;
return ptr[off];
}
More information about the Gcc-bugs
mailing list