diff options
| author | nsfisis <nsfisis@gmail.com> | 2025-09-02 00:17:51 +0900 |
|---|---|---|
| committer | nsfisis <nsfisis@gmail.com> | 2025-09-02 00:17:51 +0900 |
| commit | 16aa2c081db71181ba33aa205d2b0699efa29a99 (patch) | |
| tree | 56a16139f384c317bcd82c43bea6f7c79e80375b /tests | |
| parent | 09a245679c8d01eaec71b22985a9895667280cad (diff) | |
| download | ducc-16aa2c081db71181ba33aa205d2b0699efa29a99.tar.gz ducc-16aa2c081db71181ba33aa205d2b0699efa29a99.tar.zst ducc-16aa2c081db71181ba33aa205d2b0699efa29a99.zip | |
feat: support constant expression in array size
Diffstat (limited to 'tests')
| -rw-r--r-- | tests/118.sh | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/tests/118.sh b/tests/118.sh new file mode 100644 index 0000000..48a8569 --- /dev/null +++ b/tests/118.sh @@ -0,0 +1,19 @@ +cat <<'EOF' > expected +400 +80 +16 +EOF + +test_diff <<'EOF' +int printf(); + +int main() { + int a[10 * 10]; + int b[10 + 10]; + int c[1 << 2]; + + printf("%zu\n", sizeof(a)); + printf("%zu\n", sizeof(b)); + printf("%zu\n", sizeof(c)); +} +EOF |
