| 1 |
// REQUIRES: powerpc-registered-target |
| 2 |
// RUN: %clang_cc1 -triple powerpc64-unknown-aix -target-cpu pwr8 \ |
| 3 |
// RUN: -verify %s |
| 4 |
|
| 5 |
void test_builtin_ppc_compare_and_swap() { |
| 6 |
volatile int a = 0; |
| 7 |
long b = 0, c = 0; |
| 8 |
|
| 9 |
__compare_and_swap(&a, &b, c); // expected-error {{incompatible pointer types passing 'long *' to parameter of type 'int *'}} |
| 10 |
|
| 11 |
} |
| 12 |
|
| 13 |
void test_builtin_ppc_compare_and_swaplp() { |
| 14 |
volatile long a = 0; |
| 15 |
int b = 0, c = 0; |
| 16 |
|
| 17 |
__compare_and_swaplp(&a, &b, c);// expected-error {{incompatible pointer types passing 'int *' to parameter of type 'long *'}} |
| 18 |
|
| 19 |
} |