gcc/testsuite/g++.dg/modules/dr2867-3_b.C
raw| 1 | // CWG2867 - Order of initialization for structured bindings. |
| 2 | // { dg-do run { target c++20 } } |
| 3 | // { dg-additional-options "-fmodules-ts" } |
| 4 | // { dg-add-options tls } |
| 5 | // { dg-require-effective-target tls_runtime } |
| 6 | |
| 7 | import "dr2867-3_a.H"; |
| 8 | |
| 9 | int a, c, d, i; |
| 10 | |
| 11 | int |
| 12 | main () |
| 13 | { |
| 14 | volatile int u = c1 + x + y + z + w + c2; |
| 15 | u += d1 + s + t + u + d2; |
| 16 | u += c3 + x2 + y2 + z2 + w2 + c4; |
| 17 | u += d3 + s2 + t2 + u2 + d4; |
| 18 | assert (a == 0); |
| 19 | } |