aboutsummaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
Diffstat (limited to 'test')
-rw-r--r--test/Lexer/constants.c22
1 files changed, 22 insertions, 0 deletions
diff --git a/test/Lexer/constants.c b/test/Lexer/constants.c
index 72e0dc4231..104a3a2a2b 100644
--- a/test/Lexer/constants.c
+++ b/test/Lexer/constants.c
@@ -33,3 +33,25 @@ char e = 'abcd'; // still warn: expected-warning {{multi-character character co
#pragma clang diagnostic ignored "-Wfour-char-constants"
char f = 'abcd'; // ignored.
+
+// rdar://problem/6974641
+float t0[] = {
+ 1.9e20f,
+ 1.9e-20f,
+ 1.9e50f, // expected-error {{too large}}
+ 1.9e-50f, // expected-error {{too small}}
+ -1.9e20f,
+ -1.9e-20f,
+ -1.9e50f, // expected-error {{too large}}
+ -1.9e-50f // expected-error {{too small}}
+};
+double t1[] = {
+ 1.9e50,
+ 1.9e-50,
+ 1.9e500, // expected-error {{too large}}
+ 1.9e-500, // expected-error {{too small}}
+ -1.9e50,
+ -1.9e-50,
+ -1.9e500, // expected-error {{too large}}
+ -1.9e-500 // expected-error {{too small}}
+};