diff options
author | Rong Xu <xur@google.com> | 2014-09-02 15:29:57 -0700 |
---|---|---|
committer | Rong Xu <xur@google.com> | 2014-09-02 15:29:57 -0700 |
commit | e97c99f15937e5762a973b25192aab824126a6d3 (patch) | |
tree | 7f0be3ff7c7d976af06887dc50accd68f7630a7f /gcc-4.9/gcc/testsuite/c-c++-common | |
parent | f1c18afafc2b321465ae6b07ede127095942d7dc (diff) | |
download | toolchain_gcc-e97c99f15937e5762a973b25192aab824126a6d3.tar.gz toolchain_gcc-e97c99f15937e5762a973b25192aab824126a6d3.tar.bz2 toolchain_gcc-e97c99f15937e5762a973b25192aab824126a6d3.zip |
[gcc-4.9] Merge svn r214745 from google/gcc-4_9 branch.
Merge gcc-4_9 source r214745 from google/gcc-4_9 branch.
Change-Id: Ie6fa0fd72f4b4eec3adc4db4bb922e652d1c2605
Diffstat (limited to 'gcc-4.9/gcc/testsuite/c-c++-common')
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; +} |