aboutsummaryrefslogtreecommitdiff
path: root/gcc/testsuite/gcc.dg/gomp/bad-array-section-c-5.c
blob: 2880d171abbae5335f86aa1d6f2d951695fc9baf (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
/* { dg-do compile } */

int partly = 0;

int main()
{
  int arr[20];
#pragma omp target map(partly ? arr[5:5] : arr)
/* { dg-error {expected '\]' before ':' token} "" { target *-*-* } .-1 } */
/* { dg-error {pointer/integer type mismatch in conditional expression} "" { target *-*-* } .-2 } */
/* { dg-message {sorry, unimplemented: unsupported map expression} "" { target *-*-* } .-3 } */
  { }

  return 0;
}