gcc/testsuite/g++.dg/opt/pr55081.C
raw| 1 | // PR c++/55081 |
| 2 | // { dg-do compile } |
| 3 | |
| 4 | struct R { int field; } r; |
| 5 | |
| 6 | __UINTPTR_TYPE__ * |
| 7 | foo () |
| 8 | { |
| 9 | static __UINTPTR_TYPE__ array[] = { |
| 10 | sizeof (char), |
| 11 | (reinterpret_cast <__UINTPTR_TYPE__>(&r.field) |
| 12 | - reinterpret_cast <__UINTPTR_TYPE__>(&r)) + 1 |
| 13 | }; |
| 14 | return array; |
| 15 | } |
| 16 | |
| 17 | // { dg-final { scan-assembler-not "_ZGVZ3foovE5array" } } |