diff --git a/tests/syntax/array_formals.i b/tests/syntax/array_formals.i index b9ad0f367832c6923c3314206598d3af2cfed58c..78d48f301cb5e840dac0833c9336f7b8ef11093d 100644 --- a/tests/syntax/array_formals.i +++ b/tests/syntax/array_formals.i @@ -3,3 +3,12 @@ int f(int a[2]) { return a[1]; } int g(int a[static 2]) { return a[1]; } int h(int a[static restrict const 2]) { return a[1]; } + +typedef int (__attribute__((test)) arr)[2]; + +int k(arr a) { return a[1]; } + +int l() { + arr a = { 0 }; + return k(a); +} diff --git a/tests/syntax/oracle/array_formals.res.oracle b/tests/syntax/oracle/array_formals.res.oracle index 2adb96516469ff5479c3a32b2d84367b3e291939..50a68337f1d2c4de3d0cedf94d23c47768ab9708 100644 --- a/tests/syntax/oracle/array_formals.res.oracle +++ b/tests/syntax/oracle/array_formals.res.oracle @@ -1,5 +1,6 @@ [kernel] Parsing tests/syntax/array_formals.i (no preprocessing) /* Generated by Frama-C */ +typedef int ( __attribute__((__test__)) arr)[2]; int f(int a[2]) { int __retres; @@ -21,4 +22,19 @@ int h(int a[static const restrict 2]) return __retres; } +int k(int ( __attribute__((__test__)) a)[2]) +{ + int __retres; + __retres = *(a + 1); + return __retres; +} + +int l(void) +{ + int tmp; + arr a = {0}; + tmp = k(a); + return tmp; +} +