1 /* { dg-do compile } */
2 /* { dg-options "-fsanitize=shift -w" } */
3 /* { dg-shouldfail "ubsan" } */
9 /* None of the following should pass. */
10 int A[1 >> -1] = { 0 }; /* { dg-error "variable-sized object may not be initialized" } */
11 int B[-1 >> -1] = { 0 }; /* { dg-error "variable-sized object may not be initialized" } */
12 int D[1 << -1] = { 0 }; /* { dg-error "variable-sized object may not be initialized" } */
13 int E[-1 << -1] = { 0 }; /* { dg-error "variable-sized object may not be initialized" } */
14 int F[-1 >> 200] = { 0 }; /* { dg-error "variable-sized object may not be initialized" } */
15 int G[1 << 200] = { 0 }; /* { dg-error "variable-sized object may not be initialized" } */