aboutsummaryrefslogtreecommitdiffstats
path: root/gcc-4.9/gcc/testsuite/c-c++-common
diff options
context:
space:
mode:
authorAndrew Hsieh <andrewhsieh@google.com>2014-09-03 15:56:31 +0000
committerGerrit Code Review <noreply-gerritcodereview@google.com>2014-09-03 15:56:31 +0000
commit4254ad78d813b8c4cfc6c07218aee6b1be554f23 (patch)
tree8e9350d7e0339c5c7da9499ab5742527e21520c6 /gcc-4.9/gcc/testsuite/c-c++-common
parent9bba04175106d9b9e8a58715e3e7fa560c13e092 (diff)
parente97c99f15937e5762a973b25192aab824126a6d3 (diff)
downloadtoolchain_gcc-4254ad78d813b8c4cfc6c07218aee6b1be554f23.tar.gz
toolchain_gcc-4254ad78d813b8c4cfc6c07218aee6b1be554f23.tar.bz2
toolchain_gcc-4254ad78d813b8c4cfc6c07218aee6b1be554f23.zip
Merge "[gcc-4.9] Merge svn r214745 from google/gcc-4_9 branch. Merge gcc-4_9 source r214745 from google/gcc-4_9 branch."
Diffstat (limited to 'gcc-4.9/gcc/testsuite/c-c++-common')
-rw-r--r--gcc-4.9/gcc/testsuite/c-c++-common/cilk-plus/AN/pr61455-2.c13
-rw-r--r--gcc-4.9/gcc/testsuite/c-c++-common/cilk-plus/AN/pr61455.c9
-rw-r--r--gcc-4.9/gcc/testsuite/c-c++-common/cilk-plus/AN/pr61962.c14
-rw-r--r--gcc-4.9/gcc/testsuite/c-c++-common/cilk-plus/AN/pr61963.c9
-rw-r--r--gcc-4.9/gcc/testsuite/c-c++-common/cilk-plus/AN/pr62008.c10
-rw-r--r--gcc-4.9/gcc/testsuite/c-c++-common/pr61741.c22
6 files changed, 77 insertions, 0 deletions
diff --git a/gcc-4.9/gcc/testsuite/c-c++-common/cilk-plus/AN/pr61455-2.c b/gcc-4.9/gcc/testsuite/c-c++-common/cilk-plus/AN/pr61455-2.c
new file mode 100644
index 000000000..60b424873
--- /dev/null
+++ b/gcc-4.9/gcc/testsuite/c-c++-common/cilk-plus/AN/pr61455-2.c
@@ -0,0 +1,13 @@
+/* PR c++/61455 */
+/* { dg-options "-fcilkplus" } */
+
+int a[3] = {2, 3, 4};
+
+int main ()
+{
+ int c = 10;
+ int b = __sec_reduce_add(a[:]);
+ if (b+c != 19)
+ __builtin_abort();
+ return 0;
+}
diff --git a/gcc-4.9/gcc/testsuite/c-c++-common/cilk-plus/AN/pr61455.c b/gcc-4.9/gcc/testsuite/c-c++-common/cilk-plus/AN/pr61455.c
new file mode 100644
index 000000000..35a11b66c
--- /dev/null
+++ b/gcc-4.9/gcc/testsuite/c-c++-common/cilk-plus/AN/pr61455.c
@@ -0,0 +1,9 @@
+/* PR c++/61455 */
+/* { dg-do compile } */
+/* { dg-options "-fcilkplus" } */
+
+void foo ()
+{
+ int a[2];
+ int b = a[:]; /* { dg-error "cannot be scalar" } */
+}
diff --git a/gcc-4.9/gcc/testsuite/c-c++-common/cilk-plus/AN/pr61962.c b/gcc-4.9/gcc/testsuite/c-c++-common/cilk-plus/AN/pr61962.c
new file mode 100644
index 000000000..08d4fe236
--- /dev/null
+++ b/gcc-4.9/gcc/testsuite/c-c++-common/cilk-plus/AN/pr61962.c
@@ -0,0 +1,14 @@
+/* PR other/61962 */
+/* { dg-do compile } */
+/* { dg-options "-fcilkplus" } */
+
+struct FloatStruct
+{
+ float *f;
+};
+
+/* Either SRC or DST must be a struct, otherwise the bug does not occur. */
+void f (struct FloatStruct* dst, float *src, unsigned int length)
+{
+ dst->f[0:length] = src[0:length];
+}
diff --git a/gcc-4.9/gcc/testsuite/c-c++-common/cilk-plus/AN/pr61963.c b/gcc-4.9/gcc/testsuite/c-c++-common/cilk-plus/AN/pr61963.c
new file mode 100644
index 000000000..dfa713c4d
--- /dev/null
+++ b/gcc-4.9/gcc/testsuite/c-c++-common/cilk-plus/AN/pr61963.c
@@ -0,0 +1,9 @@
+/* PR other/61963 */
+/* { dg-do compile } */
+/* { dg-options "-fcilkplus" } */
+
+void f (int * int *a) /* { dg-error "expected" } */
+{
+ a[0:64] = 0; /* { dg-error "was not declared" "" { target c++ } 7 } */
+ a[0:64] = 0;
+}
diff --git a/gcc-4.9/gcc/testsuite/c-c++-common/cilk-plus/AN/pr62008.c b/gcc-4.9/gcc/testsuite/c-c++-common/cilk-plus/AN/pr62008.c
new file mode 100644
index 000000000..05734c560
--- /dev/null
+++ b/gcc-4.9/gcc/testsuite/c-c++-common/cilk-plus/AN/pr62008.c
@@ -0,0 +1,10 @@
+/* PR other/62008 */
+/* { dg-do compile } */
+/* { dg-options "-fcilkplus" } */
+
+void f(int *a, int w, int h)
+{
+ int tmp[w][h];
+ tmp[:][:] = a[0:w][0:h]; /* { dg-error "base of array section must be pointer or array type" } */
+ /* { dg-error "start-index and length fields necessary" "" { target c } 8 } */
+}
diff --git a/gcc-4.9/gcc/testsuite/c-c++-common/pr61741.c b/gcc-4.9/gcc/testsuite/c-c++-common/pr61741.c
new file mode 100644
index 000000000..a2bc4bda3
--- /dev/null
+++ b/gcc-4.9/gcc/testsuite/c-c++-common/pr61741.c
@@ -0,0 +1,22 @@
+/* { dg-do run } */
+
+int a = 1, b;
+
+void
+foo (void)
+{
+ signed char c = 0;
+ for (; a; a--)
+ for (; c >= 0; c++);
+ if (!c)
+ b = 1;
+}
+
+int
+main ()
+{
+ foo ();
+ if (b != 0)
+ __builtin_abort ();
+ return 0;
+}