aboutsummaryrefslogtreecommitdiffstats
path: root/gcc-4.8.1/gcc/testsuite/g++.dg/opt/pr51396.C
blob: 39ebe088788cd7c1dc499d34da8ba611db074f2a (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
// PR tree-optimization/51396
// { dg-do compile }
// { dg-options "-O2 -fnon-call-exceptions" }
// { dg-additional-options "-mfma" { target i?86-*-* x86_64-*-* } }

double baz (double) throw ();

struct C
{
  C (double d = 0.0) : c (d) {}
  double c;
};

static inline void
foo (double x, const C &y)
{
  x ? (y.c * baz (x)) : (C (), y);
}

void
bar (double x, C y)
{
  foo (x, y);
}