]> git.ipfire.org Git - thirdparty/gcc.git/blame - gcc/testsuite/gcc.dg/attr-alloc_align-5.c
Update copyright years.
[thirdparty/gcc.git] / gcc / testsuite / gcc.dg / attr-alloc_align-5.c
CommitLineData
71ad0b5d
MS
1/* PR c/78666 - conflicting attribute alloc_size accepted
2 { dg-do compile }
3 { dg-options "-Wall" } */
4
5#define A(pos) __attribute__ ((alloc_align (pos)))
6
7A (1) char* f2_1 (int, int);
8A (1) char* f2_1 (int, int); // { dg-message "previous declaration here" }
9
10A (2) char* f2_1 (int, int); // { dg-warning "ignoring attribute 'alloc_align \\\(2\\\)' because it conflicts with previous 'alloc_align \\\(1\\\)'" }
11
12
13A (2) char* f2_2 (int, int);
14A (2) char* f2_2 (int, int); // { dg-message "previous declaration here" }
15
16A (1) char* f2_2 (int, int); // { dg-warning "ignoring attribute 'alloc_align \\\(1\\\)' because it conflicts with previous 'alloc_align \\\(2\\\)'" }
17
18
19A (1) char* f3_1 (int, int, int);
20A (1) char* f3_1 (int, int, int); // { dg-message "previous declaration here" }
21
22A (2) char* f3_1 (int, int, int); // { dg-warning "ignoring attribute 'alloc_align \\\(2\\\)' because it conflicts with previous 'alloc_align \\\(1\\\)'" }
23A (3) char* f3_1 (int, int, int); // { dg-warning "ignoring attribute 'alloc_align \\\(3\\\)' because it conflicts with previous 'alloc_align \\\(1\\\)'" }