xref: /llvm-project/clang/test/CodeGen/PowerPC/builtins-ppc-xlcompat-pwr9-warning.c (revision f563bd74cb9a4f0d2d3eb49d35536b648361ec53)
1 // REQUIRES: powerpc-registered-target
2 // RUN: %clang_cc1 -triple powerpc64-unknown-linux-gnu -target-cpu pwr9 \
3 // RUN:   -verify %s
4 
5 extern unsigned long long ull;
6 extern long long ll;
7 
test_builtin_ppc_addex()8 void test_builtin_ppc_addex() {
9   long long res = __builtin_ppc_addex(ll, ll, 1); // expected-warning {{argument value 1 will result in undefined behaviour}}
10   unsigned long long res2 = __builtin_ppc_addex(ull, ull, 3); // expected-warning {{argument value 3 will result in undefined behaviour}}
11 }
12