]> git.ipfire.org Git - thirdparty/gcc.git/blob - gcc/testsuite/gcc.dg/attr-access-read-only-2.c
Update copyright years.
[thirdparty/gcc.git] / gcc / testsuite / gcc.dg / attr-access-read-only-2.c
1 /* PR c/93132 - bogus 'attribute((access))' warning when size-index
2 is specified
3 { dg-do compile }
4 { dg-options "-Wall" } */
5
6 void __attribute__ ((access (read_only, 1, 5)))
7 f (void*, int, int, int, int); // { dg-message "previous declaration" }
8
9 void __attribute__ ((access (read_only, 1, 3)))
10 f (void*, int, int, int, int); // { dg-warning "attribute 'access\\\(read_only, 1, 3\\\)' mismatched positional argument values 3 and 5" }
11
12 void __attribute__ ((access (read_only, 1, 4)))
13 f (void*, int, int, int, int); // { dg-warning "attribute 'access\\\(read_only, 1, 4\\\)' mismatched positional argument values 4 and 5" }
14
15 void __attribute__ ((access (read_only, 1, 5)))
16 f (void*, int, int, int, int);