blob: a956d0e18ab63d1ea4020dafc7c31e7bd9806712 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
|
/* PR middle-end/57541 */
/* { dg-do compile } */
/* { dg-options "-fcilkplus" } */
int A[10];
int foo () {
/* C compiler uses the term "undeclared" whereas C++ compiler uses
"not declared". Thus, grepping for declared seem to be the easiest. */
char c = (char)N; /* { dg-error "declared" } */
/* { dg-message "note: each" "defined" { target c } .-1 } */
short s = (short)N;
long l = (long)N;
A[l:s:c];
}
int foo1 (int N) {
char c = (char)N;
short s = (short)N;
A[l:s:c]; /* { dg-error "declared" } */
}
|