aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorReid Spencer <rspencer@reidspencer.com>2004-12-06 21:57:59 +0000
committerReid Spencer <rspencer@reidspencer.com>2004-12-06 21:57:59 +0000
commit66e10ab1531247f583545181104867c51612eb45 (patch)
tree6c30605189090327a0d924c3d601224fe064d09a
parent06c2e66435d7aca94fd9f26f4bf50ceeb01b5169 (diff)
downloadexternal_llvm-66e10ab1531247f583545181104867c51612eb45.zip
external_llvm-66e10ab1531247f583545181104867c51612eb45.tar.gz
external_llvm-66e10ab1531247f583545181104867c51612eb45.tar.bz2
Test case for PR409:
Make sure that floating point constant values outside the range of a float cannot be assigned to a constant. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@18582 91177308-0d34-0410-b5e6-96231b3b80d8
-rw-r--r--test/Assembler/2004-12-06-ConstantFloatRange.ll10
1 files changed, 10 insertions, 0 deletions
diff --git a/test/Assembler/2004-12-06-ConstantFloatRange.ll b/test/Assembler/2004-12-06-ConstantFloatRange.ll
new file mode 100644
index 0000000..e7404d5
--- /dev/null
+++ b/test/Assembler/2004-12-06-ConstantFloatRange.ll
@@ -0,0 +1,10 @@
+; RUN: llvm-as %s -o /dev/null 2>&1 | grep "constant invalid for type"
+
+; make sure that 'float' values are in range
+
+%D1 = constant double 3.40282347e+39
+%D2 = constant double -3.40282347e+39
+%F1 = constant float 3.40282346e+38
+%F2 = constant float -3.40282346e+38
+%D1 = constant float 3.40282347e+39
+%D2 = constant float -3.40282347e+39