Code: Select all
Const SOME_LENGTH = 10
Type Some
A As Integer
End Type
Dim p As Some Ptr = Allocate(SOME_LENGTH * SizeOf(Some))
Dim i As UInteger = 0
Do
p[i].A = 2
Loop While i < SOME_LENGTH
Code: Select all
fbc.exe -gen gcc -r unsigned.bas
Code: Select all
struct $4SOME {
int64 A;
};
__attribute__(( constructor )) static void fb_ctor__unsigned( void )
{
label$0:;
struct $4SOME* P$0;
void* vr$0 = malloc( 80ull );
P$0 = (struct $4SOME*)vr$0;
uint64 I$0;
I$0 = 0ull;
label$2:;
{
*(int64*)((uint8*)P$0 + ((int64)I$0 << (3ll & 63ll))) = 2ll;
}
label$4:;
if( I$0 < 10ull ) goto label$2;
label$3:;
label$1:;
}
Code: Select all
(int64)I$0