aboutsummaryrefslogtreecommitdiff
path: root/gcc/testsuite/g++.dg/pr87633.C
blob: 86926cd8bf837fc144d2a7f2eee3340c1b03046f (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
/* { dg-do compile } */
/* { dg-options "-O2 -fdump-tree-optimized" } */

class a {
public:
  double b() const;
};
class c {
public:
  int m_fn2() const;
};
double a::b() const {
  return 0 == 0 ? reinterpret_cast<const c *>(this)->m_fn2() : 0;
}
bool d;
void e() {
  a f;
  double g = f.b();
  /* { dg-final { scan-tree-dump-not "unord" "optimized" } } */
  d = __builtin_isnan(g);
}