1 // RUN: %clang_cc1 -fsyntax-only -triple riscv32 -Wno-strict-prototypes -verify %s
2 // RUN: %clang_cc1 -fsyntax-only -triple riscv64 -Wno-strict-prototypes -verify %s
3 // REQUIRES: riscv-registered-target
5 // Functions cannot have parameters of type __fp16.
6 extern void f (__fp16
); // expected-error {{parameters cannot have __fp16 type; did you forget * ?}}
7 extern void g (__fp16
*);
9 extern void (*pf
) (__fp16
); // expected-error {{parameters cannot have __fp16 type; did you forget * ?}}
10 extern void (*pg
) (__fp16
*);
12 typedef void(*tf
) (__fp16
); // expected-error {{parameters cannot have __fp16 type; did you forget * ?}}
13 typedef void(*tg
) (__fp16
*);
16 __fp16 a
; { // expected-error {{parameters cannot have __fp16 type; did you forget * ?}}
23 // Functions cannot return type __fp16.
24 extern __fp16
f1 (void); // expected-error {{function return value cannot have __fp16 type; did you forget * ?}}
25 extern __fp16
*g1 (void);
27 extern __fp16 (*pf1
) (void); // expected-error {{function return value cannot have __fp16 type; did you forget * ?}}
28 extern __fp16
*(*gf1
) (void);
30 typedef __fp16 (*tf1
) (void); // expected-error {{function return value cannot have __fp16 type; did you forget * ?}}
31 typedef __fp16
*(*tg1
) (void);
34 // FIXME: Should these be valid?
35 _Complex __fp16 a
; // expected-error {{'_Complex half' is invalid}}
37 a
= __builtin_complex(b
, b
); // expected-error {{'_Complex half' is invalid}}