annotate gcc/testsuite/c-c++-common/pr81052.c @ 19:2b5abeee2509 default tip

update gcc11
author anatofuz
date Mon, 25 May 2020 07:50:57 +0900
parents 04ced10e8804
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
16
kono
parents:
diff changeset
1 /* PR middle-end/81052 */
kono
parents:
diff changeset
2 /* { dg-do compile } */
kono
parents:
diff changeset
3 /* { dg-options "-fopenmp-simd -O2" } */
kono
parents:
diff changeset
4
kono
parents:
diff changeset
5 int
kono
parents:
diff changeset
6 foo (int x, int y)
kono
parents:
diff changeset
7 {
kono
parents:
diff changeset
8 int i;
kono
parents:
diff changeset
9 #pragma omp simd
kono
parents:
diff changeset
10 for (i = x; i < y; ++i)
kono
parents:
diff changeset
11 return 0; /* { dg-error "invalid branch to/from OpenMP structured block" } */
kono
parents:
diff changeset
12 return 1;
kono
parents:
diff changeset
13 }
kono
parents:
diff changeset
14
kono
parents:
diff changeset
15 #ifdef __cplusplus
kono
parents:
diff changeset
16 template <typename T>
kono
parents:
diff changeset
17 T
kono
parents:
diff changeset
18 bar (T x, T y)
kono
parents:
diff changeset
19 {
kono
parents:
diff changeset
20 T i;
kono
parents:
diff changeset
21 #pragma omp simd
kono
parents:
diff changeset
22 for (i = x; i < y; ++i)
kono
parents:
diff changeset
23 return 0; /* { dg-error "invalid branch to/from OpenMP structured block" "" { target c++ } } */
kono
parents:
diff changeset
24 return 1;
kono
parents:
diff changeset
25 }
kono
parents:
diff changeset
26
kono
parents:
diff changeset
27 int x = bar (1, 7);
kono
parents:
diff changeset
28 #endif