https://gcc.gnu.org/bugzilla/show_bug.cgi?id=86274
Jason Liam <jlame646 at gmail dot com> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |jlame646 at gmail dot com
--- Comment #22 from Jason Liam <jlame646 at gmail dot com> ---
Same issue. But also seg faults with o4 and gcc 7.5
https://godbolt.org/z/G7G7nx1Tf
#include <cmath>
#include <iostream>
#include <limits>
#include <string>
void test() {
std::cout << std::to_string(0.f) << '\n'; // make it "0" and it wont crash
}
int main() {
std::cout << std::to_string(INFINITY) << '\n';
}