This program segfaults on gcc 4.8.1 from Ubuntu 13.10. I'm building a copy of the 4.8 branch to see if I can reproduce it there.
This is on x86_64. I used a gross hack to specify the input so I don't have to think about precision issues. The numbers are all well-behaved values near 0.9.
I'll attach preprocessed source. The preprocessed source crashes even if built with gcc 4.7.something.
This program segfaults on gcc 4.8.1 from Ubuntu 13.10. I'm building a copy of the 4.8 branch to see if I can reproduce it there.
This is on x86_64. I used a gross hack to specify the input so I don't have to think about precision issues. The numbers are all well-behaved values near 0.9.
I'll attach preprocessed source. The preprocessed source crashes even if built with gcc 4.7.something.
#include <algorithm>
#include <stdint.h>
//#include <iostream>
double to_double(uint64_t x)
{
union {double d; uint64_t x;} u;
u.x = x;
return u.d;
}
int main()
std::vector< double> v = {
to_double( 460667207089024 3784),
to_double( 460667202585424 7510),
to_double( 460667180067426 6141),
to_double( 460667157549428 4772),
to_double( 460667211592624 0057),
to_double( 460667216096223 6330),
to_double( 460667207089024 3784),
{
};
// for (auto i : v)
// std::cout << i << std::endl;
return 0;
}