blob: 7bcfa605ae8bc41ec28aff2805549bab71cb5aeb [file] [log] [blame]
Meador Inge08cc03f2012-12-18 20:58:04 +00001// RUN: %clang_cc1 -fno-builtin -emit-llvm -o - %s -triple i386-unknown-unknown | FileCheck -check-prefix YES %s
2// RUN: %clang_cc1 -emit-llvm -o - %s -triple i386-unknown-unknown | FileCheck -check-prefix NO %s
3
4extern float crealf(float _Complex);
5extern double creal(double _Complex);
6extern long double creall(long double _Complex);
7
8extern float cimagf(float _Complex);
9extern double cimag(double _Complex);
10extern long double cimagl(long double _Complex);
11
12double test_creal(double _Complex z) {
13 return creal(z);
14 // CHECK-NO-NOT: call double @creal
15 // CHECK-YES: call double @creal
16}
17
18long double test_creall(double _Complex z) {
19 return creall(z);
20 // CHECK-NO-NOT: call x86_fp80 @creall
21 // CHECK-YES: call x86_fp80 @creall
22}
23
24float test_crealf(double _Complex z) {
25 return crealf(z);
26 // CHECK-NO-NOT: call float @crealf
27 // CHECK-YES: call float @crealf
28}
29
30double test_cimag(double _Complex z) {
31 return cimag(z);
32 // CHECK-NO-NOT: call double @cimag
33 // CHECK-YES: call double @cimag
34}
35
36long double test_cimagl(double _Complex z) {
37 return cimagl(z);
38 // CHECK-NO-NOT: call x86_fp80 @cimagl
39 // CHECK-YES: call x86_fp80 @cimagl
40}
41
42float test_cimagf(double _Complex z) {
43 return cimagf(z);
44 // CHECK-NO-NOT: call float @cimagf
45 // CHECK-YES: call float @cimagf
46}