aboutsummaryrefslogtreecommitdiffstats
path: root/gcc-4.9/gcc/testsuite/c-c++-common/cilk-plus/AN/pr57541.c
diff options
context:
space:
mode:
Diffstat (limited to 'gcc-4.9/gcc/testsuite/c-c++-common/cilk-plus/AN/pr57541.c')
-rwxr-xr-xgcc-4.9/gcc/testsuite/c-c++-common/cilk-plus/AN/pr57541.c17
1 files changed, 17 insertions, 0 deletions
diff --git a/gcc-4.9/gcc/testsuite/c-c++-common/cilk-plus/AN/pr57541.c b/gcc-4.9/gcc/testsuite/c-c++-common/cilk-plus/AN/pr57541.c
new file mode 100755
index 000000000..9bff07991
--- /dev/null
+++ b/gcc-4.9/gcc/testsuite/c-c++-common/cilk-plus/AN/pr57541.c
@@ -0,0 +1,17 @@
+/* { dg-do compile } */
+/* { dg-options "-fcilkplus" } */
+
+int A[10];
+
+int main () {
+
+ /* 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" } */
+ short s = (short)N;
+ long l = (long)N;
+ A[l:s:c];
+}
+
+/* { dg-message "note: each" "defined" { target c } 10 } */
+