File tree Expand file tree Collapse file tree 1 file changed +14
-0
lines changed Expand file tree Collapse file tree 1 file changed +14
-0
lines changed Original file line number Diff line number Diff line change 2
2
// RUN: %clang_cc1 -fsyntax-only -triple aarch64-linux-gnu -verify %s
3
3
// RUN: %clang_cc1 -fsyntax-only -triple riscv32-linux-gnu -verify %s
4
4
// RUN: %clang_cc1 -fsyntax-only -triple riscv64-linux-gnu -verify %s
5
+ // RUN: %clang_cc1 -fsyntax-only -triple powerpc64le-unknown-linux -verify %s
6
+ // RUN: %clang_cc1 -fsyntax-only -triple powerpc64-unknown-aix7.2.0.0 -verify %s
7
+ // RUN: %clang_cc1 -fsyntax-only -triple powerpc-unknown-aix7.2.0.0 -verify %s
5
8
6
9
extern void a (const char * );
7
10
@@ -45,5 +48,16 @@ int main(void) {
45
48
a ("vsx" );
46
49
#endif
47
50
51
+ #ifdef __powerpc__
52
+ if (__builtin_cpu_is ("garbage" )) // expected-error {{invalid cpu name for builtin}}
53
+ a ("vsx" );
54
+
55
+ if (__builtin_cpu_is ("power3" )) // expected-error {{invalid cpu name for builtin}}
56
+ a ("vsx" );
57
+
58
+ if (__builtin_cpu_supports ("garbage" )) // expected-warning {{invalid cpu feature string for builtin}}
59
+ a ("vsx" );
60
+ #endif
61
+
48
62
return 0 ;
49
63
}
You can’t perform that action at this time.
0 commit comments