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