commit baaaef00107d8ad95b74b95fe26d98e8e1262ca7 parent f6683bf0bb7f2f1737c7e2f4efa30ca62518a11a Author: Roberto E. Vargas Caballero <k0ga@shike2.com> Date: Wed, 17 Nov 2021 10:50:54 +0100 tests/cc: Add error test 0028-noconstinit.c Diffstat:
A | tests/cc/error/0028-noconstinit.c | | | 14 | ++++++++++++++ |
M | tests/cc/error/scc-tests.lst | | | 1 | + |
2 files changed, 15 insertions(+), 0 deletions(-)
diff --git a/tests/cc/error/0028-noconstinit.c b/tests/cc/error/0028-noconstinit.c @@ -0,0 +1,14 @@ +#include <limits.h> + +struct stk { + int f1; + int f2; +}; + +int +main() +{ + static struct stk s = {LLONG_MAX+1}; + + return s.f2; +} diff --git a/tests/cc/error/scc-tests.lst b/tests/cc/error/scc-tests.lst @@ -25,3 +25,4 @@ 0025-bad-init.c [TODO] 0026-numargs.c [TODO] 0027-constoverflow.c [TODO] +0028-noconstinit.c [TODO]