You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
// expected-error@+4{{'def' requires 'long_double' (aka 'long double') type support, but target 'x86_64-unknown-linux-gnu' does not support it}}
23
24
// expected-note@+3{{'def' defined here}}
24
25
// expected-note@+2{{'x' defined here}}
25
26
#endif
26
27
intdef(long_double x) {
27
-
#ifndef NOERROR
28
+
#ifdef ERROR_LONGDOUBLE
28
29
// expected-error@+2{{'x' requires 'long_double' (aka 'long double') type support, but target 'x86_64-unknown-linux-gnu' does not support it}}
29
30
#endif
30
31
return (int)x;
31
32
}
32
33
33
-
#ifndef NOERROR
34
+
#ifdef ERROR_LONGDOUBLE
34
35
// expected-note@+3{{'ld_args' defined here}}
35
36
// expected-note@+2{{'ld_args' defined here}}
36
37
#endif
37
38
intld_args(long_double x, long_double y);
38
39
39
40
intcall1(float x, float y) {
40
-
#ifndef NOERROR
41
+
#ifdef ERROR_LONGDOUBLE
41
42
// expected-error@+2 2{{'ld_args' requires 'long_double' (aka 'long double') type support, but target 'x86_64-unknown-linux-gnu' does not support it}}
42
43
#endif
43
44
returnld_args(x, y);
44
45
}
45
46
46
-
#ifndef NOERROR
47
+
#ifdef ERROR_LONGDOUBLE
47
48
// expected-note@+2{{'ld_ret' defined here}}
48
49
#endif
49
50
long_double ld_ret(double x, double y);
50
51
51
52
intcall2(float x, float y) {
52
-
#ifndef NOERROR
53
+
#ifdef ERROR_LONGDOUBLE
53
54
// expected-error@+2{{'ld_ret' requires 'long_double' (aka 'long double') type support, but target 'x86_64-unknown-linux-gnu' does not support it}}
54
55
#endif
55
56
return (int)ld_ret(x, y);
56
57
}
57
58
58
59
intbinop(double x, double y) {
59
-
#ifndef NOERROR
60
+
#ifdef ERROR_LONGDOUBLE
60
61
// expected-error@+2 2{{expression requires 'long_double' (aka 'long double') type support, but target 'x86_64-unknown-linux-gnu' does not support it}}
61
62
#endif
62
63
double z = (long_double)x * (long_double)y;
63
64
return (int)z;
64
65
}
65
66
66
67
voidassign1(long_double *ret, double x) {
67
-
#ifndef NOERROR
68
+
#ifdef ERROR_LONGDOUBLE
68
69
// expected-error@+2{{expression requires 'long_double' (aka 'long double') type support, but target 'x86_64-unknown-linux-gnu' does not support it}}
69
70
#endif
70
71
*ret = x;
71
72
}
72
73
73
74
structst_long_double1 {
74
-
#ifndef NOERROR
75
+
#ifdef ERROR_LONGDOUBLE
75
76
// expected-note@+2{{'ld' defined here}}
76
77
#endif
77
78
long_double ld;
78
79
};
79
80
80
81
structst_long_double2 {
81
-
#ifndef NOERROR
82
+
#ifdef ERROR_LONGDOUBLE
82
83
// expected-note@+2{{'ld' defined here}}
83
84
#endif
84
85
long_double ld;
85
86
};
86
87
87
88
structst_long_double3 {
88
-
#ifndef NOERROR
89
+
#ifdef ERROR_LONGDOUBLE
89
90
// expected-note@+2{{'ld' defined here}}
90
91
#endif
91
92
long_double ld;
92
93
};
93
94
94
95
voidassign2() {
95
96
structst_long_double1 st;
96
-
#ifndef NOERROR
97
+
#ifdef ERROR_LONGDOUBLE
97
98
// expected-error@+3{{expression requires 'long_double' (aka 'long double') type support, but target 'x86_64-unknown-linux-gnu' does not support it}}
98
99
// expected-error@+2{{'ld' requires 'long_double' (aka 'long double') type support, but target 'x86_64-unknown-linux-gnu' does not support it}}
99
100
#endif
@@ -102,7 +103,7 @@ void assign2() {
102
103
103
104
voidassign3() {
104
105
structst_long_double2 st;
105
-
#ifndef NOERROR
106
+
#ifdef ERROR_LONGDOUBLE
106
107
// expected-error@+3{{expression requires 'long_double' (aka 'long double') type support, but target 'x86_64-unknown-linux-gnu' does not support it}}
107
108
// expected-error@+2{{'ld' requires 'long_double' (aka 'long double') type support, but target 'x86_64-unknown-linux-gnu' does not support it}}
108
109
#endif
@@ -111,7 +112,7 @@ void assign3() {
111
112
112
113
voidassign4(double d) {
113
114
structst_long_double3 st;
114
-
#ifndef NOERROR
115
+
#ifdef ERROR_LONGDOUBLE
115
116
// expected-error@+3{{expression requires 'long_double' (aka 'long double') type support, but target 'x86_64-unknown-linux-gnu' does not support it}}
116
117
// expected-error@+2{{'ld' requires 'long_double' (aka 'long double') type support, but target 'x86_64-unknown-linux-gnu' does not support it}}
117
118
#endif
@@ -124,22 +125,42 @@ void assign5() {
124
125
}
125
126
126
127
// Double and Float return type on x86_64 do not use x87 registers
128
+
#ifdef ERROR_NOSSE
129
+
// expected-error@+3{{SSE register return with SSE disabled}}
130
+
// expected-note@+2{{'d_ret1' defined here}}
131
+
#endif
127
132
doubled_ret1(float x) {
128
133
return0.0;
129
134
}
130
135
136
+
#ifdef ERROR_NOSSE
137
+
// expected-note@+2{{'d_ret2' defined here}}
138
+
#endif
131
139
doubled_ret2(float x);
132
140
141
+
#ifdef ERROR_NOSSE
142
+
// expected-error@+3{{SSE register return with SSE disabled}}
143
+
#endif
133
144
intd_ret3(float x) {
134
145
return (int)d_ret2(x);
135
146
}
136
147
148
+
#ifdef ERROR_NOSSE
149
+
// expected-error@+3{{SSE register return with SSE disabled}}
150
+
// expected-note@+2{{'f_ret1' defined here}}
151
+
#endif
137
152
floatf_ret1(float x) {
138
153
return0.0f;
139
154
}
140
155
156
+
#ifdef ERROR_NOSSE
157
+
// expected-note@+2{{'f_ret2' defined here}}
158
+
#endif
141
159
floatf_ret2(float x);
142
160
161
+
#ifdef ERROR_NOSSE
162
+
// expected-error@+3{{SSE register return with SSE disabled}}
0 commit comments