From 97a1093ee09f5efd3569fc8bba9c10a55f4cfb36 Mon Sep 17 00:00:00 2001 From: mrdudz Date: Thu, 24 Sep 2020 12:23:18 +0200 Subject: [PATCH] test related to issue #1222 --- test/val/bug1222.c | 12 ++++++++++++ 1 file changed, 12 insertions(+) create mode 100644 test/val/bug1222.c diff --git a/test/val/bug1222.c b/test/val/bug1222.c new file mode 100644 index 000000000..5e47e452e --- /dev/null +++ b/test/val/bug1222.c @@ -0,0 +1,12 @@ +/* bug #1222 - 'sizeof' issues */ + +#include + +int a[1]; +int b[sizeof ++a[42]]; /* should work as '++a[42]' is actually unevaluated */ + +int main(void) +{ + return EXIT_SUCCESS; +} +