https://gcc.gnu.org/bugzilla/show_bug.cgi?id=81471
--- Comment #4 from Gian-Carlo Pascutto ---
Further reduced testcase:
#include
uint64_t f(uint64_t x) {
return ((uint32_t)x << 55) | ((uint32_t)x >> -23);
}
This makes it more clear the code is UB, but AFAIK a compiler ICE doesn't fall
un
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=81471
--- Comment #3 from Gian-Carlo Pascutto ---
Note the flags, -march=native in this case was Intel Haswell.
-O3 -march=haswell is required to trigger this.
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=81471
--- Comment #2 from Gian-Carlo Pascutto ---
#include
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];
: normal
Priority: P3
Component: c
Assignee: unassigned at gcc dot gnu.org
Reporter: gcp at sjeng dot org
Target Milestone: ---
gcc version 5.4.0 20160609 (Ubuntu 5.4.0-6ubuntu1~16.04.4)
-Wall -Wextra -pipe -O3 -g -ffast-math -march=native -flto -fopenmp -std
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=65950
Gian-Carlo Pascutto changed:
What|Removed |Added
CC||gcp at sjeng dot org
--- Comment