1 // NOTE: Assertions have been autogenerated by utils/update_cc_test_checks.py
2 // REQUIRES: powerpc-registered-target
3 // RUN: %clang_cc1 -triple powerpc64-unknown-aix -target-cpu pwr8 \
4 // RUN: -verify %s
5
test_builtin_ppc_fetch_and_add2()6 void test_builtin_ppc_fetch_and_add2() {
7 volatile unsigned int a = 0;
8 unsigned int b = 0;
9
10 __fetch_and_add(&a, b); // expected-warning {{passing 'volatile unsigned int *' to parameter of type 'volatile int *' converts between pointers to integer types with different sign}}
11 }
12
test_builtin_ppc_fetch_and_addlp()13 void test_builtin_ppc_fetch_and_addlp() {
14 volatile unsigned long a = 0;
15 unsigned long b = 0;
16
17 __fetch_and_addlp(&a, b); // expected-warning {{passing 'volatile unsigned long *' to parameter of type 'volatile long *' converts between pointers to integer types with different sign}}
18 }
19