diff options
| author | nsfisis <nsfisis@gmail.com> | 2025-08-11 12:09:25 +0900 |
|---|---|---|
| committer | nsfisis <nsfisis@gmail.com> | 2025-08-15 10:06:21 +0900 |
| commit | 9807d9905be951e83fa20642d3c7695f5d6c9e04 (patch) | |
| tree | 73af5bdd7f8b89fc9e63e8347fd3fd022f7f52c8 /tests/085.sh | |
| parent | b0d39831d7fa34fd47dd710d6635e5401f2d07de (diff) | |
| download | ducc-9807d9905be951e83fa20642d3c7695f5d6c9e04.tar.gz ducc-9807d9905be951e83fa20642d3c7695f5d6c9e04.tar.zst ducc-9807d9905be951e83fa20642d3c7695f5d6c9e04.zip | |
feat: support non-extern global variables
Diffstat (limited to 'tests/085.sh')
| -rw-r--r-- | tests/085.sh | 40 |
1 files changed, 40 insertions, 0 deletions
diff --git a/tests/085.sh b/tests/085.sh new file mode 100644 index 0000000..10ab24c --- /dev/null +++ b/tests/085.sh @@ -0,0 +1,40 @@ +set -e + +cat <<'EOF' > expected +0 +42 +48 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +123 +EOF + +bash ../../test_diff.sh <<'EOF' +int printf(); + +int a; +int b[12]; + +int main() { + printf("%d\n", a); + a = 42; + printf("%d\n", a); + printf("%zu\n", sizeof(b)); + int i; + for (i = 0; i < 12; ++i) { + printf("%d\n", b[i]); + } + b[11] = 123; + printf("%d\n", b[11]); +} +EOF |
