code reduced to minimum only to show the error
Code: Select all
Dim y As Double
function gs(byval z as double) as double
dim as double a, y
y=y*(z+a)^(z+.5)*exp(-z-a)
return y
end function
y = gs(.5)
Print y '<-- causes the error
sleep
if I add -asm att to the compile command then there's no problemfbc64 -t 2048 -w all -arch native -gen gcc -Wc -O2 -v "foo.bas"
FreeBASIC Compiler - Version 1.09.0 (2021-08-08), built for win64 (64bit)
Copyright (C) 2004-2021 The FreeBASIC development team.
standalone
target: win64, x86-64, 64bit
backend: gcc
compiling: foo.bas -o foo.c (main module)
compiling C: FreeBASIC-1.09.0-win-gcc-9.3\bin\win64\gcc.exe -m64 -march=native -S -nostdlib -nostdinc -Wall -Wno-unused -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 -Wno-format -masm=intel "foo.c" -o "foo.asm" -O2
assembling: FreeBASIC-1.09.0-win-gcc-9.3\bin\win64\as.exe --64 --strip-local-absolute "foo.asm" -o "foo.o"
foo.asm: Assembler messages:
foo.asm:62: Error: unsupported syntax for `call'
assembling failed: 'FreeBASIC-1.09.0-win-gcc-9.3\bin\win64\as.exe' terminated with exit code 1
Compilation failed.
compiles ok in 32-bit