shithub: scc

Download patch

ref: bea7c580a8356c387f7ab42fcdc2dfec7da06773
parent: 5e634ac1c908802ba442cb3780b386cfafeee531
author: Roberto E. Vargas Caballero <k0ga@shike2.com>
date: Wed Nov 17 05:50:54 EST 2021

tests/cc: Add error test 0028-noconstinit.c

--- /dev/null
+++ b/tests/cc/error/0028-noconstinit.c
@@ -1,0 +1,14 @@
+#include <limits.h>
+
+struct stk {
+	int f1;
+	int f2;
+};
+
+int
+main()
+{
+	static struct stk s = {LLONG_MAX+1};
+
+	return s.f2;
+}
--- 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]