blob: 8c644cc025b5eb67ac42a77884b41067ad50f474 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
|
// { dg-do compile }
import core.bitop;
import core.math;
import core.volatile;
import core.stdc.stdarg;
//////////////////////////////////////////////////////
// core.bitop
int function(uint) test_bsf() { return &bsf; }
int function(ulong) test_bsfl() { return &bsf; }
int function(uint) test_bsr() { return &bsr; }
int function(ulong) test_bsrl() { return &bsr; }
auto test_bt() { return &bt; }
// { dg-error "intrinsic function .btc. must be directly called" "" { target *-*-* } .+1 }
auto test_btc() { return &btc; }
// { dg-error "intrinsic function .btr. must be directly called" "" { target *-*-* } .+1 }
auto test_btr() { return &btr; }
// { dg-error "intrinsic function .bts. must be directly called" "" { target *-*-* } .+1 }
auto test_bts() { return &bts; }
// { dg-error "intrinsic function .byteswap. must be directly called" "" { target *-*-* } .+1 }
ushort function(ushort) test_byteswap() { return &byteswap; }
// { dg-error "intrinsic function .bswap. must be directly called" "" { target *-*-* } .+1 }
uint function(uint) test_bswap() { return &bswap; }
// { dg-error "intrinsic function .bswap. must be directly called" "" { target *-*-* } .+1 }
ulong function(ulong) test_bswapl() { return &bswap; }
int function(uint) test_popcnt() { return &popcnt; }
int function(ulong) test_popcntl() { return &popcnt; }
auto test_rol() { return &rol!ubyte; }
auto test_rol(uint a) { return &rol!(1, uint); }
auto test_ror(ushort a, uint b) { return &ror!ushort; }
auto test_ror(ulong a) { return &ror!(1, ulong); }
//////////////////////////////////////////////////////
// core.math
float function(float) test_cosf() { return &cos; }
double function(double) test_cos() { return &cos; }
real function(real) test_cosl() { return &cos; }
float function(float) test_sinf() { return &sin; }
double function(double) test_sin() { return &sin; }
real function(real) test_sinl() { return &sin; }
long function(float) test_rndtolf() { return &rndtol; }
long function(double) test_rndtol() { return &rndtol; }
long function(real) test_rndtoll() { return &rndtol; }
float function(float) test_sqrtf() { return &sqrt; }
double function(double) test_sqrt() { return &sqrt; }
real function(real) test_sqrtl() { return &sqrt; }
float function(float, int) test_ldexpf() { return &ldexp; }
double function(double, int) test_ldexp() { return &ldexp; }
real function(real, int) test_ldexpl() { return &ldexp; }
float function(float) test_fabsf() { return &fabs; }
double function(double) test_fabs() { return &fabs; }
real function(real) test_fabsl() { return &fabs; }
float function(float) test_rintf() { return &rint; }
double function(double) test_rint() { return &rint; }
real function(real) test_rintl() { return &rint; }
//////////////////////////////////////////////////////
// core.volatile
// { dg-error "intrinsic function .volatileLoad. must be directly called" "" { target *-*-* } .+1 }
ubyte function(ubyte*) test_volatileLoad8() { return &volatileLoad; }
// { dg-error "intrinsic function .volatileLoad. must be directly called" "" { target *-*-* } .+1 }
ushort function(ushort*) test_volatileLoad16() { return &volatileLoad; }
// { dg-error "intrinsic function .volatileLoad. must be directly called" "" { target *-*-* } .+1 }
uint function(uint*) test_volatileLoad32() { return &volatileLoad; }
// { dg-error "intrinsic function .volatileLoad. must be directly called" "" { target *-*-* } .+1 }
ulong function(ulong*) test_volatileLoad64() { return &volatileLoad; }
// { dg-error "intrinsic function .volatileStore. must be directly called" "" { target *-*-* } .+1 }
void function(ubyte*, ubyte) test_volatileStore8() { return &volatileStore; }
// { dg-error "intrinsic function .volatileStore. must be directly called" "" { target *-*-* } .+1 }
void function(ushort*, ushort) test_volatileStore16() { return &volatileStore; }
// { dg-error "intrinsic function .volatileStore. must be directly called" "" { target *-*-* } .+1 }
void function(uint*, uint) test_volatileStore32() { return &volatileStore; }
// { dg-error "intrinsic function .volatileStore. must be directly called" "" { target *-*-* } .+1 }
void function(ulong*, ulong) test_volatileStore64() { return &volatileStore; }
//////////////////////////////////////////////////////
// core.stdc.stdarg
// { dg-error "intrinsic function .va_start. must be directly called" "" { target *-*-* } .+1 }
auto test_va_start() { return &va_start!int; }
// { dg-error "built-in function .__builtin_va_end. must be directly called" "" { target *-*-* } .+1 }
auto test_va_end() { return &va_end; }
// { dg-error "built-in function .__builtin_va_copy. must be directly called" "" { target *-*-* } .+1 }
auto test_va_copy() { return &va_copy; }
|