Skip to content

Commit df43768

Browse files
committed
fbc: fix gcc backend trying to pass single types to double typed built-ins
1 parent 229d619 commit df43768

File tree

2 files changed

+4
-2
lines changed

2 files changed

+4
-2
lines changed

changelog.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -107,6 +107,7 @@ Version 1.08.0
107107
- github #92: FORMAT() should always have an exponent of 0 for zero.
108108
- sf.net #928: Wrong sign / type when printing BYTE values on arm/aarch64
109109
- various HANDLE_WM_*, FORWARD_WM_* macros in win/windowsx.bi were broken
110+
- gcc backend was trying to pass single types to double typed built-ins
110111

111112

112113
Version 1.07.0

src/compiler/ir-hlc.bas

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2262,7 +2262,8 @@ private function hUopToStr _
22622262
case else
22632263
is_builtin = TRUE
22642264

2265-
if( dtype = FB_DATATYPE_SINGLE ) then
2265+
'' ignore any const qualifier
2266+
if( typeGetDtAndPtrOnly( dtype ) = FB_DATATYPE_SINGLE ) then
22662267
select case as const( op )
22672268
case AST_OP_SIN : function = @"__builtin_sinf"
22682269
case AST_OP_ASIN : function = @"__builtin_asinf"
@@ -2277,7 +2278,7 @@ private function hUopToStr _
22772278
case else : assert( FALSE )
22782279
end select
22792280
else
2280-
assert( dtype = FB_DATATYPE_DOUBLE )
2281+
assert( typeGetDtAndPtrOnly( dtype ) = FB_DATATYPE_DOUBLE )
22812282
select case as const( op )
22822283
case AST_OP_SIN : function = @"__builtin_sin"
22832284
case AST_OP_ASIN : function = @"__builtin_asin"

0 commit comments

Comments
 (0)