used FreeBASIC Compiler - Version 1.06.0 (09-18-2018), built for win64 (64bit)
[edit] apparently it's a bug related to using the FB that's included in WinFBE, it could be related to the merging of 32 and 64-bit versions in one folder
I have my reservations about the merging, because the path structure used in the standalone version of FB is hardcoded, if I am not mistaken.
test.bas
Code: Select all
dim as integer j
dim as single s
asm
nop
end asm
for j=1 to 3
s+=sqr(j)
next
if you change s+=sqr(j) to s+=j then it compiles
if you change s+=sqr(j) to s+=sin(j) then it compiles
if you omit the flag -mfpmath=387 then it compiles
Code: Select all
G:\WinFBE_Suite\FreeBASIC-1.06.0\fbc64 -w all -Wc -mfpmath=387,-O2 -v "test.bas" (in directory: F:\FreeBASIC Programs)
FreeBASIC Compiler - Version 1.06.0 (09-18-2018), built for win64 (64bit)
Copyright (C) 2004-2016 The FreeBASIC development team.
standalone
target: win64, x86-64, 64bit
compiling: test.bas -o test.c (main module)
compiling C: G:\WinFBE_Suite\FreeBASIC-1.06.0\bin\win64\gcc.exe -m64 -march=x86-64 -S -nostdlib -nostdinc -Wall -Wno-unused-label -Wno-unused-function -Wno-unused-variable -Wno-unused-but-set-variable -Wno-main -Werror-implicit-function-declaration -O0 -fno-strict-aliasing -frounding-math -fno-math-errno -fwrapv -fno-exceptions -fno-unwind-tables -fno-asynchronous-unwind-tables -masm=intel "test.c" -o "test.asm" -mfpmath=387 -O2
during RTL pass: final
test.c: In function 'main':
test.c:40:1: internal compiler error: output_operand: invalid use of register 'frame'
}
^
Please submit a full bug report,
with preprocessed source if appropriate.
See <https://sourceforge.net/projects/mingw-w64> for instructions.
compiling C failed: 'G:\WinFBE_Suite\FreeBASIC-1.06.0\bin\win64\gcc.exe' terminated with exit code 1
Compilation failed.