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
Copy file name to clipboardExpand all lines: compiler-rt/test/ubsan/TestCases/Float/cast-overflow.cpp
+10-5Lines changed: 10 additions & 5 deletions
Original file line number
Diff line number
Diff line change
@@ -131,14 +131,19 @@ int main(int argc, char **argv) {
131
131
return0;
132
132
}
133
133
case'5': {
134
-
// CHECK-5: {{.*}}cast-overflow.cpp:[[@LINE+1]]:27: runtime error: {{.*}} is outside the range of representable values of type 'int'
134
+
// CHECK-5: {{.*}}cast-overflow.cpp:[[@LINE+1]]:28: runtime error: {{.*}} is outside the range of representable values of type 'int'
135
+
staticint test_int = (__fp16)Inf;
136
+
return0;
137
+
}
138
+
case'6': {
139
+
// CHECK-6: {{.*}}cast-overflow.cpp:[[@LINE+1]]:27: runtime error: {{.*}} is outside the range of representable values of type 'int'
135
140
staticint test_int = NaN;
136
141
return0;
137
142
}
138
143
139
144
// Integer -> floating point overflow.
140
-
case'6': {
141
-
// CHECK-6: cast-overflow.cpp:[[@LINE+2]]:{{27: runtime error: 3.40282e\+38 is outside the range of representable values of type 'int'| __int128 not supported}}
145
+
case'7': {
146
+
// CHECK-7: cast-overflow.cpp:[[@LINE+2]]:{{27: runtime error: 3.40282e\+38 is outside the range of representable values of type 'int'| __int128 not supported}}
0 commit comments