This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug target/81471] internal compiler error: in curr_insn_transform, at lra-constraints.c:3495
- From: "gcp at sjeng dot org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Mon, 17 Jul 2017 19:45:25 +0000
- Subject: [Bug target/81471] internal compiler error: in curr_insn_transform, at lra-constraints.c:3495
- Auto-submitted: auto-generated
- References: <bug-81471-4@http.gcc.gnu.org/bugzilla/>
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=81471
--- Comment #2 from Gian-Carlo Pascutto <gcp at sjeng dot org> ---
#include <stdint.h>
inline uint32_t rotl(const uint32_t x, const int k) {
return (x << k) | (x >> (32 - k));
}
uint64_t s[2];
uint64_t random(void) {
const uint64_t s0 = s[0];
uint64_t s1 = s[1];
const uint64_t result = s0 + s1;
s1 ^= s0;
s[0] = rotl(s0, 55) ^ s1 ^ (s1 << 14);
s[1] = rotl(s1, 36);
return result;
}
int main(void) {
int x = random();
return 0;
}
According to https://godbolt.org/g/8CVJ9a this is broken in all current gcc
versions, not just 5.4.0.