Skip to content
Snippets Groups Projects
Commit 210ca97c authored by Virgile Prevosto's avatar Virgile Prevosto
Browse files

[tests] test handling of attribute on an array type.

parent d80c34ee
No related branches found
No related tags found
No related merge requests found
......@@ -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);
}
[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;
}
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment