| 1 |
// { dg-do compile { target c++11 } } |
| 2 |
|
| 3 |
struct A |
| 4 |
{ |
| 5 |
const int *p[2]; |
| 6 |
}; |
| 7 |
|
| 8 |
constexpr const int * f(const int *p) { return p; } |
| 9 |
|
| 10 |
int main() |
| 11 |
{ |
| 12 |
constexpr int i = 42; |
| 13 |
constexpr int j = *&i; // OK |
| 14 |
constexpr int k = *A{{&i}}.p[0]; // OK |
| 15 |
constexpr int l = *f(&i); // OK |
| 16 |
} |