This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c++/81014] internal compiler error: in make_decl_rtl, at varasm.c:1311
- From: "rain.backnet at gmail dot com" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Thu, 29 Jun 2017 15:07:26 +0000
- Subject: [Bug c++/81014] internal compiler error: in make_decl_rtl, at varasm.c:1311
- Auto-submitted: auto-generated
- References: <bug-81014-4@http.gcc.gnu.org/bugzilla/>
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=81014
--- Comment #2 from SlowRiot <rain.backnet at gmail dot com> ---
Alright, this is the moment. I have journeyed deep into the mountains and
meditated long on the problem. I finally managed, after many years of
dedicated effort, to reduce our ~200MB codebase to an isolated example, and
then spent many more years carving down a ~10k LOC minimal example to the
polished, shining gem of a testcase you see below. Reproducible everywhere on
GCC7 on Linux, this does not cause a problem on GCC6.
// Crash: g++-7 -fsanitize=float-divide-by-zero -c crash_test.cpp
// internal compiler error: in make_decl_rtl, at varasm.c:1311
#include <cmath>
class foo {
public:
foo() {
long double root = std::sqrt(1234);
root = 4321 / root;
// the numbers are arbitrary, bug occurs with any values
}
};
foo bar;