diff --git a/tests/syntax/init_array_string.i b/tests/syntax/init_array_string.i new file mode 100644 index 0000000000000000000000000000000000000000..b301c8d102c89b5af92f735919eba4354067c9b4 --- /dev/null +++ b/tests/syntax/init_array_string.i @@ -0,0 +1,11 @@ +char* ptr = "A" "B"; + +char* ptr2 = ("A" "B"); + +char a[] = "A" "B"; + +char b[] = ("A" "B"); + +char c[] = "ABC"; + +char d[] = ("ABC"); diff --git a/tests/syntax/oracle/init_array_string.res.oracle b/tests/syntax/oracle/init_array_string.res.oracle new file mode 100644 index 0000000000000000000000000000000000000000..92a54fcd30d30a8e538a08cdce4cbe65e3a9caa8 --- /dev/null +++ b/tests/syntax/oracle/init_array_string.res.oracle @@ -0,0 +1,9 @@ +[kernel] Parsing init_array_string.i (no preprocessing) +/* Generated by Frama-C */ +char *ptr = (char *)"AB"; +char *ptr2 = (char *)"AB"; +char a[3] = {(char)'A', (char)'B', (char)'\000'}; +char b[3] = {(char)'A', (char)'B', (char)'\000'}; +char c[4] = {(char)'A', (char)'B', (char)'C', (char)'\000'}; +char d[4] = {(char)'A', (char)'B', (char)'C', (char)'\000'}; +