llvm-project icon indicating copy to clipboard operation
llvm-project copied to clipboard

Bad __DBL_MIN__, __LDBL_MIN__, ... generated

Open dobbelaj-snps opened this issue 14 years ago • 2 comments

Bugzilla Link 14285
Resolution FIXED
Resolved on Nov 09, 2012 18:20
Version trunk
OS All
Blocks llvm/llvm-project#14265
Attachments Patch that adds the correct suffix to FLT_MIN, ...
CC @efriedma-quic

Extended Description

When a backend wants to map a 'double' type to a float instance, it indicates this with setting the 'DoubleFormat' to &llvm::APFloat::IEEESingle Same thing can be done for 'LongDobleFormat'.

This is mostly fine (the C 'double' type will result in 'f32' llvm-ir type, but some of the internal generated min/max numbers (FLT_MIN, DBL_MIN, ...) contain the wrong suffix, such that DBL_MIN will be interpreted as a float type, in stead of a double type.

dobbelaj-snps avatar Nov 08 '12 00:11 dobbelaj-snps

r167649.

efriedma-quic avatar Nov 10 '12 02:11 efriedma-quic

Please send patches to cfe-commits.

efriedma-quic avatar Nov 08 '12 01:11 efriedma-quic