Skip analyzer strndup test on hppa*-*-hpux*
[official-gcc.git] / gcc / testsuite / gcc.dg / attr-access-none.c
blobdc06d057479d32a28e00c27c70eba2eafaaeca0f
1 /* Test to verify the handling of attribute access (none).
2 { dg-do compile }
3 { dg-options "-O -Wall -ftrack-macro-expansion=0" } */
5 int __attribute__ ((access (none, 1)))
6 fnone_pv1 (void*);
8 void nowarn_fnone_pv1 (void)
10 int x;
11 fnone_pv1 (&x);
15 int __attribute__ ((access (none, 1)))
16 fnone_pcv1 (const void*);
18 void nowarn_fnone_pcv1 (void)
20 char a[2];
21 fnone_pcv1 (a);
25 int __attribute__ ((access (none, 1, 2)))
26 fnone_pcv1_2 (const void*, int); // { dg-message "in a call to function 'fnone_pcv1_2' declared with attribute 'access \\\(none, 1, 2\\\)'" "note" }
28 void nowarn_fnone_pcv1_2 (void)
30 char a[2];
31 fnone_pcv1_2 (a, 2);
34 void warn_fnone_pcv1_2 (void)
36 char a[3];
37 fnone_pcv1_2 (a, 4); // { dg-warning "expecting 4 bytes in a region of size 3" }