| 1 |
// PR c++/96862 |
| 2 |
// { dg-do compile { target c++17 } } |
| 3 |
// { dg-additional-options "-frounding-math -fexcess-precision=fast" } |
| 4 |
|
| 5 |
constexpr double a = 0x1.0p+100 + 0x1.0p-100; |
| 6 |
const double b = 0x1.0p+100 + 0x1.0p-100; |
| 7 |
const double &&c = 0x1.0p+100 + 0x1.0p-100; |
| 8 |
static_assert (0x1.0p+100 + 0x1.0p-100 == 0x1.0p+100, ""); |
| 9 |
|
| 10 |
void |
| 11 |
foo () |
| 12 |
{ |
| 13 |
constexpr double d = 0x1.0p+100 + 0x1.0p-100; |
| 14 |
const double e = 0x1.0p+100 + 0x1.0p-100; |
| 15 |
const double &&f = 0x1.0p+100 + 0x1.0p-100; |
| 16 |
static_assert (0x1.0p+100 + 0x1.0p-100 == 0x1.0p+100, ""); |
| 17 |
} |
| 18 |
|
| 19 |
const double &g = a; |
| 20 |
const double &h = b; |