1 // This testcase resulted in invalid code generation on x86_64 targets
2 // due to a bug in fold_rtx. For a "true" value, fold_rtx represented it
3 // as const_true_rtx in floating-point mode, if the FLOAT_STORE_FLAG_VALUE
4 // macro is not defined.
7 // { dg-options "-O1 -fno-guess-branch-probability -fcse-follow-jumps -fgcse -frerun-cse-after-loop" }
13 StatVal(double ev, double va)
17 StatVal(const StatVal& other)
21 StatVal& operator*=(const StatVal& other) {
22 double A = m == 0 ? 1.0 : v / (m * m);
23 double B = other.m == 0 ? 1.0 : other.v / (other.m * other.m);
33 extern "C" void abort (void);
35 const StatVal two_dot_three(2, 0.3);
37 int main(int argc, char **argv) {
39 StatVal product3(two_dot_three);
41 product3 *= two_dot_three;