This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug c++/81014] internal compiler error: in make_decl_rtl, at varasm.c:1311


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;

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]