xref: /llvm-project/clang/test/CodeGen/PowerPC/builtins-ppc-xlcompat-cas-error.c (revision f563bd74cb9a4f0d2d3eb49d35536b648361ec53)
1 // REQUIRES: powerpc-registered-target
2 // RUN: %clang_cc1 -triple powerpc64-unknown-aix -target-cpu pwr8 \
3 // RUN:   -verify %s
4 
test_builtin_ppc_compare_and_swap()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-warning {{incompatible pointer types passing 'long *' to parameter of type 'int *'}}
10 
11 }
12 
test_builtin_ppc_compare_and_swaplp()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-warning {{incompatible pointer types passing 'int *' to parameter of type 'long *'}}
18 
19 }
20