summaryrefslogtreecommitdiff
path: root/gcc/testsuite/g++.dg/init/float1.C
blob: d18ff3db0a2f716776fad406190ef1beabb92fb2 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
// PR c++/21089
// { dg-do run }

extern "C" void abort();

static const double a = 1.0;
struct S {
  S();
};
static S s;
static const double b = a + 1.0;

S::S() {
  if (b < 1.9 || b > 2.1)
    abort ();
}

int main () {
}