Gas64 (no more use of gcc, only gas) WDS / LNX

User projects written in or related to FreeBASIC.
robert
Posts: 125
Joined: Aug 06, 2019 18:45

Re: Gas64 (no more use of gcc, only gas) WDS / LNX

Postby robert » Mar 21, 2020 4:24

Hi SARG:

Running unit-tests with fbc64_gas64 installed as fbc.

On the unit-tests make, va_cva_api.bas

Code: Select all


# include "fbcunit.bi"

#define SB1 -128
#define SB2 127

#define UB1 0
#define UB2 255

#define SS1 -32768
#define SS2 32767

#define US1 0
#define US2 65535

#define SL1 -2147483648
#define SL2 2147483647

#define UL1 0
#define UL2 4294967295

#define SLL1 (-9223372036854775807ll-1ll)
#define SLL2 9223372036854775807ll

#define ULL1 0
#define ULl2 18446744073709551615ull

#if sizeof(integer) = 4
   #define UI1 UL1
   #define UI2 UL2
   #define SI1 SL1
   #define SI2 SL2
#else
   #define UI1 ULL1
   #define UI2 ULL2
   #define SI1 SLL1
   #define SI2 SLL2
#endif


SUITE( fbc_tests.functions.va_cva_api )

   '' cva_start(), cva_arg(), cva_end()

   sub f_test_start cdecl( byval n as integer, ... )
      
      dim as cva_list x = any

      cva_start( x, n )

      for i as integer = 1 to n
         dim a as integer = cva_arg( x, integer )
         CU_ASSERT( a = i * 100 )
      next i

      cva_end( x )

   end sub

   TEST( start )
      f_test_start( 10, 100, 200, 300, 400, 500, 600, 700, 800, 900, 1000 )
   END_TEST

   '' cva_start(), cva_arg(), cva_copy(), cva_end()

   sub f_test_copy cdecl( byval n as integer, ... )
      
      dim as cva_list x1 = any, x2 = any, y1 = any, y2 = any

      cva_start( x1, n )
      cva_copy( x2, x1 )
      cva_copy( y1, x1 )
      cva_copy( y2, x1 )

      for i as integer = 1 to n
         
         dim a1 as integer = cva_arg( x1, integer )
         dim a2 as integer = cva_arg( x2, integer )

         CU_ASSERT( a1 = i * 100 )
         CU_ASSERT( a2 = i * 100 )

      next

      cva_end( x1 )
      cva_end( x2 )

      for i as integer = 1 to n
         
         dim a1 as integer = cva_arg( y1, integer )
         dim a2 as integer = cva_arg( y2, integer )

         CU_ASSERT( a1 = i * 100 )
         CU_ASSERT( a2 = i * 100 )

      next

      cva_end( y1 )
      cva_end( y2 )

   end sub

   TEST( copy )
      f_test_copy( 10, 100, 200, 300, 400, 500, 600, 700, 800, 900, 1000 )
   END_TEST

   sub f_test_list2 cdecl( byval n as integer, byval args as cva_list )
      
      dim as cva_list x = any

      cva_copy( x, args )

      for i as integer = 1 to n
         dim a as integer = cva_arg( x, integer )
         CU_ASSERT( a = i * 100 )
      next i

      cva_end( x )

   end sub

   sub f_test_list cdecl( byval n as integer, ... )
      
      dim as cva_list x = any

      cva_start( x, n )

      f_test_list2( n, x )

      for i as integer = 1 to n
         dim a as integer = cva_arg( x, integer )
         CU_ASSERT( a = i * 100 )
      next i

      cva_end( x )

   end sub

   TEST( list )
      f_test_list( 10, 100, 200, 300, 400, 500, 600, 700, 800, 900, 1000 )
   END_TEST

   
   '' cva_arg()
   ''
   '' depending on the platform, up to 6 arguments will be passed in registers
   '' to make sure we are looking at both registers and stack, we pass 10
   '' arguments of each type

   #macro DEFN_BASICTYPE( T, ARG1, ARG2, ARG3, ARG4, ARG5, ARG6, ARG7, ARG8, ARG9, ARG10 )

      sub f_test_arg_##t cdecl( byval n as integer, ... )
         
         dim as cva_list x = any

         cva_start( x, n )

         '' ignore n, there is always 10 arguments

         CU_ASSERT_EQUAL( cva_arg( x, T ), ARG1 )
         CU_ASSERT_EQUAL( cva_arg( x, T ), ARG2 )
         CU_ASSERT_EQUAL( cva_arg( x, T ), ARG3 )
         CU_ASSERT_EQUAL( cva_arg( x, T ), ARG4 )
         CU_ASSERT_EQUAL( cva_arg( x, T ), ARG5 )
         CU_ASSERT_EQUAL( cva_arg( x, T ), ARG6 )
         CU_ASSERT_EQUAL( cva_arg( x, T ), ARG7 )
         CU_ASSERT_EQUAL( cva_arg( x, T ), ARG8 )
         CU_ASSERT_EQUAL( cva_arg( x, T ), ARG9 )
         CU_ASSERT_EQUAL( cva_arg( x, T ), ARG10 )

         cva_end( x )

      end sub
   #endmacro

   DEFN_BASICTYPE( ubyte , 1,   0, SB2, UB1, UB2, 0,   0, SB2, UB1, UB2 )
   DEFN_BASICTYPE( byte  , 2, SB1, SB2, UB1,   0, 0, SB1, SB2, UB1,   0 )

   DEFN_BASICTYPE( ushort, 3,   0, SS2, US1, US2, 0,   0, SS2, US1, US2 )
   DEFN_BASICTYPE( short , 4, SS1, SS2, US1,   0, 0, SS1, SS2, US1,   0 )

   DEFN_BASICTYPE( ulong , 5,   0, SL2, UL1, UL2, 0,   0, SL2, UL1, UL2 )
   DEFN_BASICTYPE( long  , 6, SL1, SL2, UL1,   0, 0, SL1, SL2, UL1,   0 )

   DEFN_BASICTYPE( uinteger ,  7,    0,  SI2,  UI1,  UI2, 0,    0,  SI2,  UI1,  UI2 )
   DEFN_BASICTYPE( integer  ,  8,  SI1,  SI2,  UI1,    0, 0,  SI1,  SI2,  UI1,    0 )

   DEFN_BASICTYPE( ulongint ,  9,    0, SLL2, ULL1, ULL2, 0,    0, SLL2, ULL1, ULL2 )
   DEFN_BASICTYPE( longint  , 10, SLL1, SLL2, ULL1,    0, 0, SLL1, SLL2, ULL1,    0 )

   #macro TEST_BASICTYPE( T, CV, ARG1, ARG2, ARG3, ARG4, ARG5, ARG6, ARG7, ARG8, ARG9, ARG10 )
      f_test_arg_##T ( 10, CV(ARG1), CV(ARG2), CV(ARG3), CV(ARG4), CV(ARG5), CV(ARG6), CV(ARG7), CV(ARG8), CV(ARG9), CV(ARG10) )
   #endmacro


   TEST( basic_types )
      TEST_BASICTYPE ( ubyte, cubyte, 1,   0, SB2, UB1, UB2, 0,   0, SB2, UB1, UB2 )
      TEST_BASICTYPE ( byte , cbyte , 2, SB1, SB2, UB1,   0, 0, SB1, SB2, UB1,   0 )

      TEST_BASICTYPE ( ushort, cushort, 3,   0, SS2, US1, US2, 0,   0, SS2, US1, US2 )
      TEST_BASICTYPE ( short , cshort , 4, SS1, SS2, US1,   0, 0, SS1, SS2, US1,   0 )

      TEST_BASICTYPE ( ulong, culng, 5,   0, SL2, UL1, UL2, 0,   0, SL2, UL1, UL2 )
      TEST_BASICTYPE  ( long , clng, 6, SL1, SL2, UL1,   0, 0, SL1, SL2, UL1,   0 )

      TEST_BASICTYPE ( uinteger, cuint, 7,    0,  SI2,  UI1,  UI2, 0,    0,  SI2,  UI1,  UI2 )
      TEST_BASICTYPE ( integer , cint , 8,  SI1,  SI2,  UI1,    0, 0,  SI1,  SI2,  UI1,    0 )

      TEST_BASICTYPE ( ulongint, culngint, 9,    0, SLL2, ULL1, ULL2, 0,    0, SLL2, ULL1, ULL2 )
      TEST_BASICTYPE ( longint , clngint , 10, SLL1, SLL2, ULL1,    0, 0, SLL1, SLL2, ULL1,    0 )
   END_TEST


   '' byval/byref/ptr arguments

   #macro sum_cva_list_args( expr )

      '' iterate using a copy
      dim x as cva_list
      cva_copy( x, expr )
      dim d as integer = 0
      for i as integer = 1 to n
         d += cva_arg( x, integer )
      next
      cva_end( x )

      '' iterate using argument passed
      dim c as integer = 0
      for i as integer = 1 to n
         c += cva_arg( expr, integer )
      next
      CU_ASSERT( c = d )

   #endmacro

   function f_arg_byval ( total as integer, byval n as integer, byval args as cva_list ) as integer
      sum_cva_list_args( args )
      function = c
   end function

   function f_arg_byref ( total as integer, byval n as integer, byref args as cva_list ) as integer
      sum_cva_list_args( args )
      function = c
   end function

   function f_arg_byref_ptr ( total as integer, byval n as integer, byref args as cva_list ptr ) as integer
      sum_cva_list_args( *args )
      function = c
   end function

   function f_arg_ptr ( total as integer, byval n as integer, byval args as cva_list ptr ) as integer
      sum_cva_list_args( *args )
      function = c
   end function

   function f_arg_ptr_ptr ( total as integer, byval n as integer, byval args as cva_list ptr ptr ) as integer
      sum_cva_list_args( **args )
      function = c
   end function

   sub argument_tests cdecl( total as integer, byval n as integer, ... )
      
      dim as cva_list args

      '' var passed byval
      scope
         cva_start( args, n )
         CU_ASSERT( f_arg_byval( total, n, args ) = total )
         cva_end( args )
      end scope

      '' byref var passed byval
      scope
         dim byref as cva_list r_args = args
         cva_start( r_args, n )
         CU_ASSERT( f_arg_byval( total, n, r_args ) = total )
         cva_end( r_args )
      end scope
      
      '' var passed byref
      scope
         cva_start( args, n )
         CU_ASSERT( f_arg_byref( total, n, args ) = total )
         cva_end( args )
      end scope

      '' byref var passed byref
      scope
         dim byref as cva_list r_args = args
         cva_start( r_args, n )
         CU_ASSERT( f_arg_byref( total, n, r_args ) = total )
         cva_end( r_args )
      end scope

      '' pointer var passed byref
      scope
         dim as cva_list ptr pargs = @args
         cva_start( *pargs, n )
         CU_ASSERT( f_arg_byref_ptr( total, n, pargs ) = total )
         cva_end( *pargs )
      end scope

      '' pointer var passed byval
      scope
         dim as cva_list ptr pargs = @args
         cva_start( *pargs, n )
         CU_ASSERT( f_arg_ptr( total, n, pargs ) = total )
         cva_end( *pargs )
      end scope

      '' var passed by pointer
      scope
         cva_start( args, n )
         CU_ASSERT( f_arg_ptr( total, n, @args ) = total )
         cva_end( args )
      end scope

      '' multi indirection pointer
      scope
         dim as cva_list ptr pargs = @args
         dim as cva_list ptr ptr ppargs = @pargs
         cva_start( **ppargs, n )
         CU_ASSERT( f_arg_ptr( total, n, *ppargs ) = total )
         cva_end( **ppargs )
      end scope

      '' multi indirection pointer
      scope
         dim as cva_list ptr pargs = @args
         cva_start( *pargs, n )
         CU_ASSERT( f_arg_ptr_ptr( total, n, @pargs ) = total )
         cva_end( *pargs )
      end scope

      '' multi indirection pointer
      scope
         dim as cva_list ptr pargs = @args
         dim as cva_list ptr ptr ppargs = @pargs
         cva_start( **ppargs, n )
         CU_ASSERT( f_arg_ptr_ptr( total, n, ppargs ) = total )
         cva_end( **ppargs )
      end scope

   end sub

   TEST( arguments )
      argument_tests( 4321, 4, 4000, 300, 20, 1 )
   END_TEST

   type udt_vararg
      f1 as cva_list
      f2 as cva_list
   end type

   sub complex_tests cdecl( total as integer, byval n as integer, ... )
      dim u as udt_vararg

      '' cva_list is udt field
      scope
         cva_start( u.f1, n )
         sum_cva_list_args( u.f1 )
         cva_end( u.f1 )
      end scope

      scope
         cva_start( u.f2, n )
         sum_cva_list_args( u.f2 )
         cva_end( u.f2 )
      end scope

      '' cva_list is array element
      dim a(1 to 2) as cva_list

      scope
         cva_start( a(1), n )
         sum_cva_list_args( a(1) )
         cva_end( a(1) )
      end scope

      scope
         cva_start( a(2), n )
         sum_cva_list_args( a(2) )
         cva_end( a(2) )
      end scope

      '' cva_list is allocated on heap with new/delete
      dim p as cva_list ptr = new cva_list
      scope
         cva_start( *p, n )
         sum_cva_list_args( *p )
         cva_end( *p )
      end scope
      delete p

   end sub

   TEST( complex )
      complex_tests( 1234, 4, 1000, 200, 30, 4 )
   END_TEST

#if defined(__FB_LINUX__) and defined(__FB_64BIT__)
   '' Returning an array not allowed in gcc and some
   '' tests will fail to compile in gcc on linux x86_64.
   '' To handle returning a byval cva_list, would need to
   '' pass it in a hidden argument and make the function
   '' void, or possibly wrap the va_list type in another
   '' structure.  Generally, the copy assignment/passing
   '' of va_list[0] in gcc is different from what fbc can
   '' currently handle and should be avoided anyway.
   #if ENABLE_CHECK_BUGS
      #define VALIST_CAN_RETURN_BYVAL 1
   #else
      #define VALIST_CAN_RETURN_BYVAL 0
   #endif
#else
   '' otherwise, assume it's OK for the platform (needs
   '' testing on all target/arch, though).
   #define VALIST_CAN_RETURN_BYVAL 1
#endif

   function ret_valist_ptr( byval args as cva_list ptr ) as cva_list ptr
      function = args
   end function

   sub proc_cva_list_ptr cdecl( byval n as integer, ... )
      dim args as cva_list
      dim x as cva_list ptr = @args
      dim i as integer

      cva_start( args, n )
      dim arg1 as integer = cva_arg( args, integer )
      dim arg2 as integer = cva_arg( args, integer )
      dim arg3 as integer = cva_arg( args, integer )
      dim arg4 as integer = cva_arg( args, integer )
      cva_end( args )

      cva_start( args, n )
      x = ret_valist_ptr( @args )
      CU_ASSERT( cva_arg( *x, integer ) = arg1 )
      CU_ASSERT( cva_arg( *x, integer ) = arg2 )
      CU_ASSERT( cva_arg( *x, integer ) = arg3 )
      CU_ASSERT( cva_arg( *x, integer ) = arg4 )
      cva_end( args )
   end sub

#if VALIST_CAN_RETURN_BYVAL
   function ret_valist_byval( byval args as cva_list ) as cva_list
      function = args
   end function

   sub proc_cva_list_byval cdecl( byval n as integer, ... )
      dim args as cva_list
      dim x as cva_list
      dim i as integer

      cva_start( args, n )
      dim arg1 as integer = cva_arg( args, integer )
      dim arg2 as integer = cva_arg( args, integer )
      dim arg3 as integer = cva_arg( args, integer )
      dim arg4 as integer = cva_arg( args, integer )
      cva_end( args )

      cva_start( args, n )
      x = ret_valist_byval( args )
      CU_ASSERT( cva_arg( x, integer ) = arg1 )
      CU_ASSERT( cva_arg( x, integer ) = arg2 )
      CU_ASSERT( cva_arg( x, integer ) = arg3 )
      CU_ASSERT( cva_arg( x, integer ) = arg4 )
      cva_end( args )
   end sub
#else
   sub proc_cva_list_byval cdecl( byval n as integer, ... )
   end sub
#endif

   function ret_valist_byref( byref args as cva_list ) byref as cva_list
      function = args
   end function

   sub proc_cva_list_byref cdecl( byval n as integer, ... )
      dim args as cva_list
      dim byref x as cva_list = args
      dim i as integer

      cva_start( args, n )
      dim arg1 as integer = cva_arg( args, integer )
      dim arg2 as integer = cva_arg( args, integer )
      dim arg3 as integer = cva_arg( args, integer )
      dim arg4 as integer = cva_arg( args, integer )
      cva_end( args )

      cva_start( args, n )
      x = ret_valist_byref( args )
      CU_ASSERT( cva_arg( x, integer ) = arg1 )
      CU_ASSERT( cva_arg( x, integer ) = arg2 )
      CU_ASSERT( cva_arg( x, integer ) = arg3 )
      CU_ASSERT( cva_arg( x, integer ) = arg4 )
      cva_end( args )
   end sub

   TEST( cva_list_return_byval )
      proc_cva_list_byval( 4, 4000, 300, 200, 1 )
      proc_cva_list_byref( 4, 4000, 300, 200, 1 )
      proc_cva_list_ptr( 4, 4000, 300, 200, 1 )
   END_TEST

#if VALIST_CAN_RETURN_BYVAL
   function sidefx_byval( byval args as cva_list ) as cva_list
      function = args
   end function
#endif

   function sidefx_ptr( byval args as cva_list ptr ) as cva_list ptr
      function = args
   end function

   function sidefx_byref( byref args as cva_list ) byref as cva_list
      function = args
   end function

   sub proc_sidefx cdecl( byval n as integer, ... )
      dim args as cva_list

      cva_start( args, n )
      dim arg1 as integer = cva_arg( args, integer )
      dim arg2 as integer = cva_arg( args, integer )
      dim arg3 as integer = cva_arg( args, integer )
      dim arg4 as integer = cva_arg( args, integer )
      dim arg5 as integer = cva_arg( args, integer )
      dim arg6 as integer = cva_arg( args, integer )
      cva_end( args )

      cva_start( args, n )
#if VALIST_CAN_RETURN_BYVAL
      CU_ASSERT_EQUAL( cva_arg( sidefx_byval( args ), integer ), arg1 )
      CU_ASSERT_EQUAL( cva_arg( sidefx_byval( args ), integer ), arg1 )
#endif
      CU_ASSERT_EQUAL( cva_arg( sidefx_byref( args ), integer ), arg1 )
      CU_ASSERT_EQUAL( cva_arg( sidefx_byref( args ), integer ), arg2 )
      CU_ASSERT_EQUAL( cva_arg( sidefx_byref( args ), integer ), arg3 )
      CU_ASSERT_EQUAL( cva_arg( *sidefx_ptr( @args ), integer ), arg4 )
      CU_ASSERT_EQUAL( cva_arg( *sidefx_ptr( @args ), integer ), arg5 )
      CU_ASSERT_EQUAL( cva_arg( *sidefx_ptr( @args ), integer ), arg6 )
      cva_end( args )
   end sub

   TEST( side_effects )
      proc_sidefx( 6, 600000, 50000, 4000, 300, 20, 1 )
   END_TEST

END_SUITE



errored out with

Code: Select all


fbc -c -w 3 -i fbcunit/inc -m fbc-tests -mt functions/va_cva_api.bas
functions/va_cva_api.a64: Assembler messages:
functions/va_cva_api.a64:138: Error: no such instruction: `found AN ERROR:emitstore datatype not handled 03='
functions/va_cva_api.a64:140: Error: junk at end of line, first unrecognized character is `-'
functions/va_cva_api.a64:141: Error: number of operands mismatch for `mov'
functions/va_cva_api.a64:143: Error: no such instruction: `found AN ERROR:emitstore datatype not handled 03='
functions/va_cva_api.a64:145: Error: junk at end of line, first unrecognized character is `-'
functions/va_cva_api.a64:146: Error: number of operands mismatch for `mov'
functions/va_cva_api.a64:148: Error: no such instruction: `found AN ERROR:emitstore datatype not handled 03='
functions/va_cva_api.a64:150: Error: junk at end of line, first unrecognized character is `-'
functions/va_cva_api.a64:151: Error: number of operands mismatch for `mov'
functions/va_cva_api.a64:335: Error: no such instruction: `found AN ERROR:emitstore datatype not handled 03='
functions/va_cva_api.a64:337: Error: junk at end of line, first unrecognized character is `-'
functions/va_cva_api.a64:338: Error: number of operands mismatch for `mov'
functions/va_cva_api.a64:3787: Error: no such instruction: `found AN ERROR:emitstore datatype not handled 03='
functions/va_cva_api.a64:3789: Error: junk at end of line, first unrecognized character is `-'
functions/va_cva_api.a64:3790: Error: number of operands mismatch for `mov'
functions/va_cva_api.a64:3886: Error: no such instruction: `found AN ERROR:emitstore datatype not handled 03='
functions/va_cva_api.a64:3888: Error: junk at end of line, first unrecognized character is `0'
functions/va_cva_api.a64:3889: Error: number of operands mismatch for `mov'
functions/va_cva_api.a64:3987: Error: no such instruction: `found AN ERROR:emitstore datatype not handled 03='
functions/va_cva_api.a64:3989: Error: junk at end of line, first unrecognized character is `0'
functions/va_cva_api.a64:3990: Error: number of operands mismatch for `mov'
functions/va_cva_api.a64:4088: Error: no such instruction: `found AN ERROR:emitstore datatype not handled 03='
functions/va_cva_api.a64:4090: Error: junk at end of line, first unrecognized character is `0'
functions/va_cva_api.a64:4091: Error: number of operands mismatch for `mov'
functions/va_cva_api.a64:4189: Error: no such instruction: `found AN ERROR:emitstore datatype not handled 03='
functions/va_cva_api.a64:4191: Error: junk at end of line, first unrecognized character is `0'
functions/va_cva_api.a64:4192: Error: number of operands mismatch for `mov'
functions/va_cva_api.a64:4659: Error: no such instruction: `found AN ERROR:emitstore datatype not handled 03='
functions/va_cva_api.a64:4661: Error: junk at end of line, first unrecognized character is `-'
functions/va_cva_api.a64:4662: Error: number of operands mismatch for `mov'
functions/va_cva_api.a64:4743: Error: no such instruction: `found AN ERROR:emitstore datatype not handled 03='
functions/va_cva_api.a64:4745: Error: junk at end of line, first unrecognized character is `-'
functions/va_cva_api.a64:4746: Error: number of operands mismatch for `mov'
functions/va_cva_api.a64:4845: Error: no such instruction: `found AN ERROR:emitstore datatype not handled 03='
functions/va_cva_api.a64:4847: Error: junk at end of line, first unrecognized character is `-'
functions/va_cva_api.a64:4848: Error: number of operands mismatch for `mov'
functions/va_cva_api.a64:4929: Error: no such instruction: `found AN ERROR:emitstore datatype not handled 03='
functions/va_cva_api.a64:4931: Error: junk at end of line, first unrecognized character is `-'
functions/va_cva_api.a64:4932: Error: number of operands mismatch for `mov'
functions/va_cva_api.a64:5029: Error: no such instruction: `found AN ERROR:emitstore datatype not handled 03='
functions/va_cva_api.a64:5031: Error: junk at end of line, first unrecognized character is `0'
functions/va_cva_api.a64:5032: Error: number of operands mismatch for `mov'
make[1]: *** [unit-tests.mk:132: functions/va_cva_api.o] Error 1

SARG
Posts: 1157
Joined: May 27, 2005 7:15
Location: FRANCE

Re: Gas64 (no more use of gcc, only gas) WDS / LNX

Postby SARG » Mar 21, 2020 20:30

Hi all,

robert wrote:Three recursive warning-free error-free self compiles.
Before uploading I did the same :-)

About the errors, Don't know why I completly forgot to add cva_copy in my own tests although enough complex.
Happily there are some controls for unhandled datatypes avoiding crash and pointing clearly the cause.

Fixed now. http://users.freebasic-portal.de/sarg/fbc64_gas64.zip

All the test suite is passed ? As I don't use make it's a bit painful.
Many thanks again for your interest.

Off topic : Where are you from ?
Xusinboy Bekchanov
Posts: 254
Joined: Jul 26, 2018 18:28

Re: Gas64 (no more use of gcc, only gas) WDS / LNX

Postby Xusinboy Bekchanov » Mar 21, 2020 22:20

SARG wrote:@Xusinboy
The issue found with visualFBEditor,much simplier, is almost fixed.
Edit : fix done. However as gtk3, cario pango, etc are not installed I can not test.

And the 1.07 WDS version was not updated in the zip file. Also done now.

The Windows version works correctly, but in the Linux version there is a problem when returning from the function:

Code: Select all

#define __USE_GTK3__
#include once "gtk/gtk.bi"

Function OnDraw(widget As GtkWidget Ptr, cr As cairo_t Ptr, data1 As Any Ptr) As Boolean
   Return False
End Function

gtk_init( 0, NULL )

'' Create a new window
Var win = gtk_window_new( GTK_WINDOW_TOPLEVEL )
gtk_window_set_title( GTK_WINDOW(win), "Layout" )

'' Connect destroy event to the window.
g_signal_connect( G_OBJECT(win), "delete-event", _
G_CALLBACK(@gtk_main_quit), NULL )

Var layout = gtk_layout_new(NULL, NULL)

Var button = gtk_button_new_with_label("Write it")
g_signal_connect( G_OBJECT(button), "draw", _
G_CALLBACK(@OnDraw), button)

gtk_layout_put(gtk_layout(layout), button, 10, 10)
''
gtk_container_add( GTK_CONTAINER(win), layout )

gtk_widget_show_all( win )

gtk_main( )

End 0

In OnDraw function there is Return false. If false is returned then the rest of the drawing events should also be executed. If true is returned, then the rest of the functions (standard drawing functions) should not be executed. Now the button is not drawn. In other events, too, after connecting, standard handlers are not executed.
robert
Posts: 125
Joined: Aug 06, 2019 18:45

Re: Gas64 (no more use of gcc, only gas) WDS / LNX

Postby robert » Mar 22, 2020 3:58

SARG wrote:Hi all,

All the test suite is passed ? As I don't use make it's a bit painful.


Hi SARG:

I'm just doing the unit-tests first and, if anything is broken, waiting for a fix from you before continuing since I am not knowledgeable enough to be able to tell whether a problem is a recurrence or not. When the unit-tests are done I will move on to the log-tests.

The next problem with the current fbc64_GAS64 build is with /tests/quirk/zwstr-deref.bas

Code: Select all


#include "fbcunit.bi"

SUITE( fbc_tests.quirk.zwstr_deref )

   TEST( all )
      dim s as string
      dim f as  string * 31
      dim as zstring * 32 z, z0
      dim as wstring * 32 w, w0
      dim pz as zstring ptr = @z0
      dim pw as wstring ptr = @w0
      dim as integer i
      dim as double d
      dim as longint ll

      '' Normally, DEREF'ing a zstring/wstring pointer "returns" a string.
      '' But in some contexts such as BOPs or ASSIGNs, a zwstring/wstring
      '' DEREF can become a simple char/wchar DEREF, i.e. it will access the
      '' char values instead of "returning" a string. This depends on the
      '' type of the second operand.
      ''
      '' This is mostly testing all kinds of expression combinations to
      '' ensure the parser/AST accept it properly.

      z0 = "123"
      w0 = wstr( "123" )
      CU_ASSERT( *pz = "123" )
      CU_ASSERT( "123" = *pz )
      CU_ASSERT( *pw = wstr( "123" ) )
      CU_ASSERT( wstr( "123" ) = *pw )

      s = *pz
      f = *pz
      z = *pz
      w = *pz
      CU_ASSERT( s = "123" )
      CU_ASSERT( f = "123" )
      CU_ASSERT( z = "123" )
      CU_ASSERT( w = "123" )

      s = *pw
      f = *pw
      z = *pw
      w = *pw
      CU_ASSERT( s = wstr( "123" ) )
      CU_ASSERT( f = wstr( "123" ) )
      CU_ASSERT( z = wstr( "123" ) )
      CU_ASSERT( w = wstr( "123" ) )

      *pz = "456"         : CU_ASSERT( *pz = "456" )
      *pz = wstr( "456" ) : CU_ASSERT( *pz = wstr( "456" ) )
      *pz = s             : CU_ASSERT( *pz = s )
      *pz = f             : CU_ASSERT( *pz = f )
      *pz = z             : CU_ASSERT( *pz = z )
      *pz = w             : CU_ASSERT( *pz = w )

      *pw = "456"         : CU_ASSERT( *pw = "456" )
      *pw = wstr( "456" ) : CU_ASSERT( *pw = wstr( "456" ) )
      *pw = s             : CU_ASSERT( *pw = s )
      *pw = f             : CU_ASSERT( *pw = f )
      *pw = z             : CU_ASSERT( *pw = z )
      *pw = w             : CU_ASSERT( *pw = w )

      '' but the other operand can be an integer too:
      z0 = "123"
      i = *pz
      CU_ASSERT( i = asc( "1" ) )
      i = 0

      w0 = wstr( "123" )
      i = *pw
      CU_ASSERT( i = asc( "1" ) )
      i = 0

      z0 = "123"
      w0 = wstr( "123" )
      i = asc( "7" )
      *pz = i
      *pw = i
      CU_ASSERT( *pz = "723" )
      CU_ASSERT( *pw = wstr( "723" ) )

      '' or a longint:
      z0 = "123"
      ll = *pz
      CU_ASSERT( ll = asc( "1" ) )
      ll = 0

      w0 = wstr( "123" )
      ll = *pw
      CU_ASSERT( ll = asc( "1" ) )
      ll = 0

      z0 = "123"
      w0 = wstr( "123" )
      ll = asc( "7" )
      *pz = ll
      *pw = ll
      CU_ASSERT( *pz = "723" )
      CU_ASSERT( *pw = wstr( "723" ) )

      '' or a float:
      z0 = "123"
      d = *pz
      CU_ASSERT( d = asc( "1" ) )
      d = 0

      w0 = wstr( "123" )
      d = *pw
      CU_ASSERT( d = asc( "1" ) )
      d = 0

      z0 = "123"
      w0 = wstr( "123" )
      d = asc( "7" )
      *pz = d
      *pw = d
      CU_ASSERT( *pz = "723" )
      CU_ASSERT( *pw = wstr( "723" ) )

      '' The DEREF can even have an index. If it's a z/wstring DEREF, then
      '' the string will start at that position. If it's being treated as
      '' char/wchar DEREF then it works like pointer indexing.
      z0 = "123"
      CU_ASSERT( pz[0] = "123" )  '' other operand is a string
      CU_ASSERT( pz[1] = "23" )
      CU_ASSERT( pz[2] = "3" )
      CU_ASSERT( pz[3] = "" )
      CU_ASSERT( pz[0] = asc( "1" ) )  '' other operand is an integer
      CU_ASSERT( pz[1] = asc( "2" ) )
      CU_ASSERT( pz[2] = asc( "3" ) )
      CU_ASSERT( pz[3] = 0 )

      CU_ASSERT( *(pz+0) = "123" )
      CU_ASSERT( *(pz+1) = "23" )
      CU_ASSERT( *(pz+2) = "3" )
      CU_ASSERT( *(pz+3) = "" )
      CU_ASSERT( *(pz+0) = asc( "1" ) )
      CU_ASSERT( *(pz+1) = asc( "2" ) )
      CU_ASSERT( *(pz+2) = asc( "3" ) )
      CU_ASSERT( *(pz+3) = 0 )

      z0 = "123"
      i = pz[1]
      CU_ASSERT( i = asc( "2" ) )
      i = 0

      z0 = "123"
      i = asc( "7" )
      pz[1] = i
      CU_ASSERT( *pz = "173" )

      z0 = "123"
      ll = pz[1]
      CU_ASSERT( ll = asc( "2" ) )
      ll = 0

      z0 = "123"
      ll = asc( "7" )
      pz[1] = ll
      CU_ASSERT( *pz = "173" )

      z0 = "123"
      d = pz[1]
      CU_ASSERT( d = asc( "2" ) )
      d = 0

      z0 = "123"
      d = asc( "7" )
      pz[1] = d
      CU_ASSERT( *pz = "173" )

      w0 = wstr( "123" )
      CU_ASSERT( pw[0] = wstr( "123" ) )  '' other operand is a string
      CU_ASSERT( pw[1] = wstr( "23" ) )
      CU_ASSERT( pw[2] = wstr( "3" ) )
      CU_ASSERT( pw[3] = wstr( "" ) )
      CU_ASSERT( pw[0] = asc( "1" ) )  '' other operand is an integer
      CU_ASSERT( pw[1] = asc( "2" ) )
      CU_ASSERT( pw[2] = asc( "3" ) )
      CU_ASSERT( pw[3] = 0 )

      CU_ASSERT( *(pw+0) = wstr( "123" ) )
      CU_ASSERT( *(pw+1) = wstr( "23" ) )
      CU_ASSERT( *(pw+2) = wstr( "3" ) )
      CU_ASSERT( *(pw+3) = wstr( "" ) )
      CU_ASSERT( *(pw+0) = asc( "1" ) )
      CU_ASSERT( *(pw+1) = asc( "2" ) )
      CU_ASSERT( *(pw+2) = asc( "3" ) )
      CU_ASSERT( *(pw+3) = 0 )

      w0 = wstr( "123" )
      i = pw[1]
      CU_ASSERT( i = asc( "2" ) )
      i = 0

      w0 = wstr( "123" )
      i = asc( "7" )
      pw[1] = i
      CU_ASSERT( *pw = wstr( "173" ) )

      w0 = wstr( "123" )
      ll = pw[1]
      CU_ASSERT( ll = asc( "2" ) )
      ll = 0

      w0 = wstr( "123" )
      ll = asc( "7" )
      pw[1] = ll
      CU_ASSERT( *pw = wstr( "173" ) )

      w0 = wstr( "123" )
      d = pw[1]
      CU_ASSERT( d = asc( "2" ) )
      d = 0

      w0 = wstr( "123" )
      d = asc( "7" )
      pw[1] = d
      CU_ASSERT( *pw = wstr( "173" ) )

      z0 = "123"
      if( *pz    = "123"      ) then CU_PASS( ) else CU_FAIL( )  '' string comparison
      if(  pz[0] = "123"      ) then CU_PASS( ) else CU_FAIL( )
      if(  pz[1] =  "23"      ) then CU_PASS( ) else CU_FAIL( )
      if( *pz    = asc( "1" ) ) then CU_PASS( ) else CU_FAIL( )  '' char comparison
      if(  pz[0] = asc( "1" ) ) then CU_PASS( ) else CU_FAIL( )
      if(  pz[1] = asc( "2" ) ) then CU_PASS( ) else CU_FAIL( )

      '' string select
      z0 = "123"
      select case( *pz )
      case "123"
         CU_PASS( )
      case else
         CU_FAIL( )
      end select

      '' wstring select
      w0 = wstr( "123" )
      select case( *pw )
      case wstr( "123" )
         CU_PASS( )
      case else
         CU_FAIL( )
      end select

      '' char select
      z0 = "123"
      select case( (*pz)[0] )
      case asc( "1" )
         CU_PASS( )
      case else
         CU_FAIL( )
      end select

      '' wchar select
      w0 = wstr( "123" )
      select case( (*pw)[0] )
      case asc( "1" )
         CU_PASS( )
      case else
         CU_FAIL( )
      end select

      '' Both sides can be DEREFs
      dim as zstring ptr pz0 = @z0
      dim as wstring ptr pw0 = @w0
      pz = @z
      pw = @w
      z0 = "123"
      z  = "123"
      w0 = wstr( "123" )
      w  = wstr( "123" )

      CU_ASSERT( *pz = *pz )
      CU_ASSERT( *pw = *pw )
      CU_ASSERT( *pz0 = *pz )
      CU_ASSERT( *pw0 = *pw )

      '' string indexing works on such DEREFs too
      CU_ASSERT(    z [0] = asc( "1" ) )
      CU_ASSERT(    z [1] = asc( "2" ) )
      CU_ASSERT(    z [2] = asc( "3" ) )
      CU_ASSERT(    z [3] = 0          )
      CU_ASSERT( (*pz)[0] = asc( "1" ) )
      CU_ASSERT( (*pz)[1] = asc( "2" ) )
      CU_ASSERT( (*pz)[2] = asc( "3" ) )
      CU_ASSERT( (*pz)[3] = 0          )

      CU_ASSERT(    z0 [0] =    z [0] )
      CU_ASSERT(    z0 [1] =    z [1] )
      CU_ASSERT( (*pz0)[0] = (*pz)[0] )
      CU_ASSERT( (*pz0)[1] = (*pz)[1] )

      '' We can even use indexing on the DEREF first and then again on
      '' the "resulting" string
      CU_ASSERT( pz[0][0] = asc( "1" ) )
      CU_ASSERT( pz[0][1] = asc( "2" ) )
      CU_ASSERT( pz[0][2] = asc( "3" ) )
      CU_ASSERT( pz[0][3] = 0          )

      CU_ASSERT( pz[0][0] = asc( "1" ) )
      CU_ASSERT( pz[1][0] = asc( "2" ) )
      CU_ASSERT( pz[2][0] = asc( "3" ) )
      CU_ASSERT( pz[3][0] = 0          )

      CU_ASSERT( pz[1][0] = asc( "2" ) )
      CU_ASSERT( pz[1][1] = asc( "3" ) )
      CU_ASSERT( pz[1][2] = 0          )
   END_TEST

END_SUITE



which errored out with

Code: Select all


fbc -c -w 3 -i fbcunit/inc -m fbc-tests -mt quirk/zwstr-deref.bas
quirk/zwstr-deref.a64: Assembler messages:
quirk/zwstr-deref.a64:1012: Error: invalid instruction suffix for `movzx'
quirk/zwstr-deref.a64:2005: Error: invalid instruction suffix for `movzx'
make[1]: *** [unit-tests.mk:132: quirk/zwstr-deref.o] Error 1



SARG wrote:Hi all,

Off topic : Where are you from ?

Canada
SARG
Posts: 1157
Joined: May 27, 2005 7:15
Location: FRANCE

Re: Gas64 (no more use of gcc, only gas) WDS / LNX

Postby SARG » Mar 22, 2020 19:57

Hi all,

robert wrote:I'm just doing the unit-tests first and, if anything is broken, waiting for a fix from you before continuing since I am not knowledgeable enough to be able to tell whether a problem is a recurrence or not. When the unit-tests are done I will move on to the log-tests.
Could you just post 2 or 3 errored unit tests at a time as that I could fix more without waiting the next. :-)

robert wrote:The next problem with the current fbc64_GAS64 build is with /tests/quirk/zwstr-deref.bas
Fixed now.
http://users.freebasic-portal.de/sarg/fbc64_gas64.zip

The version for Linux uses libtinfo.so.5 like the original fbc. I just put the file with the source and define the path for the linker.

@Xusinboy
I tried to reproduce the error with the code below (copying the working of code you provided) without succes.
If possible post an example without Gtk.

Code: Select all

function ffalse(strg as string) as boolean
    return false
end function

function test_callback(fptr as sub)as boolean
   dim as function(as string)as boolean fptr2
   fptr2=cast(function(as string)as boolean,fptr)
   return fptr2("from test_callback")
end function

print "direct=";ffalse("simple")

print "with callback=";test_callback(cast(sub,@ffalse))
sleep
robert
Posts: 125
Joined: Aug 06, 2019 18:45

Re: Gas64 (no more use of gcc, only gas) WDS / LNX

Postby robert » Mar 22, 2020 20:51

Hi SARG:

SARG wrote:Could you just post 2 or 3 errored unit tests at a time as that I could fix more without waiting the next. :-)

I will try to figure out how to do that. It will require more than adjusting a makefile.

SARG wrote:
robert wrote:The next problem with the current fbc64_GAS64 build is with /tests/quirk/zwstr-deref.bas
Fixed now.
http://users.freebasic-portal.de/sarg/fbc64_gas64.zip

Not fixed here. Same problem

Code: Select all


fbc -c -w 3 -i fbcunit/inc -m fbc-tests -mt quirk/zwstr-deref.bas
quirk/zwstr-deref.a64: Assembler messages:
quirk/zwstr-deref.a64:1012: Error: invalid instruction suffix for `movzx'
quirk/zwstr-deref.a64:2005: Error: invalid instruction suffix for `movzx'
make[1]: *** [unit-tests.mk:132: quirk/zwstr-deref.o] Error 1


SARG wrote:The version for Linux uses libtinfo.so.5 like the original fbc. I just put the file with the source and define the path for the linker.

I do not understand this comment. Is this necessary to fix the above problem? I already have /lib64/libtinfo.so.5.
robert
Posts: 125
Joined: Aug 06, 2019 18:45

Re: Gas64 (no more use of gcc, only gas) WDS / LNX

Postby robert » Mar 22, 2020 22:15

Here are three more errors.

1. Failed wstring/wz-conv.bas

Code: Select all

#include "fbcunit.bi"

SUITE( fbc_tests.wstring_.wz_conv )

   TEST( wstringToZstring )
      dim w as wstring * 50

      '' Store some Unicode text into w. This Russian text here happens to be
      '' the same for UTF16 (Windows wstring) and UTF32 (Linux wstring).
      w[ 0] = &h041D
      w[ 1] = &h043E
      w[ 2] = &h0432
      w[ 3] = &h0430
      w[ 4] = &h044F
      w[ 5] = &h0020
      w[ 6] = &h043F
      w[ 7] = &h0440
      w[ 8] = &h043E
      w[ 9] = &h0433
      w[10] = &h0440
      w[11] = &h0430
      w[12] = &h043C
      w[13] = &h043C
      w[14] = &h0430

      '' Convert to zstring
      dim s as string
      dim z as zstring * 50
      s = w
      z = w
      CU_ASSERT( len( s ) > 0 )
      CU_ASSERT( len( z ) > 0 )

      '' Ideally we could test the conversion results, but...
      ''  - it depends on the system codepage at run-time. There are system
      ''    functions to set that, but it's probably still not portable..
      ''  - the conversion is lossy (especially when converting from Unicode
      ''    to codepage and then back to Unicode)
      'CU_ASSERT( s = "..." )
      'CU_ASSERT( z = "..." )

      '' Convert back to wstring
      dim w_from_s as wstring * 50
      dim w_from_z as wstring * 50
      w_from_s = s
      w_from_z = z
      CU_ASSERT( len( w_from_s ) > 0 )
      CU_ASSERT( len( w_from_z ) > 0 )

      '' Ideally we'll get out what we started with, but that's not guaranteed...
      'CU_ASSERT( w_from_s = w )
      'CU_ASSERT( w_from_z = w )
   END_TEST

END_SUITE

errored out with

Code: Select all

fbc -c -w 3 -i fbcunit/inc -m fbc-tests -mt wstring/wz-conv.bas
fbc -l fbcunit -p fbcunit/lib -x fbc-tests @unit-tests-obj.lst ./fbc-tests.o
./pretest/style_simple.o() warning 20(3): Object files or libraries with mixed multithreading (-mt) options
ld: ./fbc-int/array.o: in function `TESTS::FBC_TESTS::FBC_INT::ARRAY::STATIC_FIXED()':
(.text+0x13): undefined reference to `FBC::fb_ArrayGetDesc(FBARRAY<void>&)'
ld: (.text+0x34d): undefined reference to `FBC::fb_ArrayGetDesc(FBARRAY<void>&)'
ld: ./fbc-int/array.o: in function `TESTS::FBC_TESTS::FBC_INT::ARRAY::STATIC_EMPTY()':
(.text+0x78e): undefined reference to `FBC::fb_ArrayGetDesc(FBARRAY<void>&)'
ld: (.text+0xf6d): undefined reference to `FBC::fb_ArrayGetDesc(FBARRAY<void>&)'
ld: (.text+0x17fe): undefined reference to `FBC::fb_ArrayGetDesc(FBARRAY<void>&)'
ld: ./fbc-int/array.o:(.text+0x24b0): more undefined references to `FBC::fb_ArrayGetDesc(FBARRAY<void>&)' follow
ld: ./fbc-int/memory.o: in function `TESTS::FBC_TESTS::FBC_INT::MEMORY::CLEAR_()':
(.text+0x16): undefined reference to `_ZN3FBC6callocEmS0_'
ld: (.text+0x29): undefined reference to `_ZN3FBC6callocEmS0_'
ld: (.text+0x1af): undefined reference to `FBC::memset(void*, int, unsigned long)'
ld: (.text+0x285): undefined reference to `FBC::free(void const*)'
ld: (.text+0x28e): undefined reference to `FBC::free(void const*)'
ld: ./fbc-int/memory.o: in function `TESTS::FBC_TESTS::FBC_INT::MEMORY::ALLOCS()':
(.text+0x2ad): undefined reference to `_ZN3FBC6callocEmS0_'
ld: (.text+0x2bb): undefined reference to `FBC::malloc(unsigned long)'
ld: (.text+0x2cb): undefined reference to `FBC::realloc(void const*, unsigned long)'
ld: (.text+0x2e1): undefined reference to `_ZN3FBC6callocEmS0_'
ld: (.text+0x314): undefined reference to `FBC::memcpy(void*, void const*, unsigned long)'
ld: (.text+0x329): undefined reference to `FBC::memmove(void*, void const*, unsigned long)'
ld: (.text+0x480): undefined reference to `FBC::memset(void*, int, unsigned long)'
ld: (.text+0x490): undefined reference to `FBC::memset(void*, int, unsigned long)'
ld: (.text+0x4a3): undefined reference to `FBC::memset(void*, int, unsigned long)'
ld: (.text+0x6a1): undefined reference to `FBC::free(void const*)'
ld: (.text+0x6ad): undefined reference to `FBC::free(void const*)'
ld: (.text+0x6b6): undefined reference to `FBC::free(void const*)'
ld: (.text+0x6bf): undefined reference to `FBC::free(void const*)'
ld: ./fbc-int/memory.o: in function `TESTS::FBC_TESTS::FBC_INT::MEMORY::MEMMOVE_()':
(.text+0x6de): undefined reference to `_ZN3FBC6callocEmS0_'
ld: (.text+0x6f1): undefined reference to `_ZN3FBC6callocEmS0_'
ld: (.text+0x770): undefined reference to `FBC::memmove(void*, void const*, unsigned long)'
ld: (.text+0x8cd): undefined reference to `FBC::memmove(void*, void const*, unsigned long)'
ld: (.text+0x9b1): undefined reference to `FBC::free(void const*)'
ld: (.text+0x9ba): undefined reference to `FBC::free(void const*)'
ld: ./fbc-int/memory.o: in function `TESTS::FBC_TESTS::FBC_INT::MEMORY::USING_FBC()':
(.text+0x9d9): undefined reference to `_ZN3FBC6callocEmS0_'
ld: (.text+0x9f7): undefined reference to `FBC::realloc(void const*, unsigned long)'
ld: (.text+0xa0d): undefined reference to `_ZN3FBC6callocEmS0_'
ld: ./fbc-int/memory.o: in function `ALLOCATE':
(.text+0xa8e): undefined reference to `FBC::malloc(unsigned long)'
ld: ./fbc-int/memory.o: in function `DEALLOCATE':
(.text+0xaba): undefined reference to `FBC::free(void const*)'
make[1]: *** [unit-tests.mk:178: build_tests] Error 1


2. Failed wstring/write.bas

Code: Select all

#include "fbcunit.bi"

#define PRINT_IF_UNEQUAL

#define BUFFER_SIZE 50

#define QT(s) wstr("""" & wstr(s) & """")

#define WWRITE( value, cmp ) _
   write #(1), value, cmp

#macro OPEN_FILE( fn )
   const TESTFILE = ("./wstring/" & fn)

   open TESTFILE for output encoding "utf-16" as #1
#endmacro

#macro CLOSE_AND_TEST_FILE()
   close #1

   dim as wstring * BUFFER_SIZE sResult, sExpected
   dim as integer errcount = 0
   open TESTFILE for input encoding "utf-16" as #1
      do until eof(1)
         input #1, sResult, sExpected
         if( sResult <> sExpected ) then
#ifdef PRINT_IF_UNEQUAL
            print QT(sResult) & " <> " & QT(sExpected)
            errcount += 1
#endif
         end if
         CU_ASSERT_EQUAL( sResult, sExpected )
      loop
   close #1

   if errcount = 0 then
      kill TESTFILE
   end if
#endmacro


SUITE( fbc_tests.wstring_.write_ )

   TEST( numbers )

      #macro check( dtype, value )
         scope
            dim x as dtype = value
            dim cmp as wstring * BUFFER_SIZE = wstr( value )
            WWRITE( x, cmp )
         end scope      
      #endmacro

      OPEN_FILE( "write_numbers.txt" )

      check( boolean, false )
      check( boolean, true )

      check( byte, -128 )
      check( byte, -0 )
      check( byte, 127 )

      check( ubyte, 0 )
      check( ubyte, 128 )
      check( ubyte, 255 )

      check( short, -32768 )
      check( short, 0 )
      check( short, 32767 )

      check( ushort, 0 )
      check( ushort, 32768 )
      check( ushort, 65535 )

      check( long, -2147483648ll )
      check( long, 0 )
      check( long, 2147483647ull )

      check( ulong, 0 )
      check( ulong, 2147483648ull )
      check( ulong, 4294967295ull )

      check( longint, (-9223372036854775807ll-1ll) )
      check( longint, 0 )
      check( longint, 9223372036854775807ull )

      check( ulongint, 0 )
      check( ulongint, 9223372036854775808ull )
      check( ulongint, 18446744073709551615ull )

      check( single, -1.5 )
      check( single, -1.0 )
      check( single, -1.0 )
      check( single, -0.5 )
      check( single,  0.0 )
      check( single,  0.5 )
      check( single,  1.0)
      check( single,  1.5 )
      check( single,  2.0 )
      check( single,  2.5 )

      check( double, -1.5 )
      check( double, -1.0 )
      check( double, -1.0 )
      check( double, -0.5 )
      check( double,  0.0 )
      check( double,  0.5 )
      check( double,  1.0)
      check( double,  1.5 )
      check( double,  2.0 )
      check( double,  2.5 )

      CLOSE_AND_TEST_FILE()

   END_TEST

   TEST( strings )

      #macro check( literal )
         scope
            dim x as wstring * BUFFER_SIZE = literal
            WWRITE( x, literal )
         end scope      
      #endmacro

      OPEN_FILE( "write_strings.txt" )

      check( "" )
      check( " " )
      check( "0123456789" )
      check( "ABCDEFGHIJKLMNOP" )
      check( !"\u3041\u3043\u3045\u3047\u3049" )

      CLOSE_AND_TEST_FILE()

   END_TEST

END_SUITE


errored out with

Code: Select all

fbc -c -w 3 -i fbcunit/inc -m fbc-tests -mt wstring/write.bas
fbc -l fbcunit -p fbcunit/lib -x fbc-tests @unit-tests-obj.lst ./fbc-tests.o
./pretest/style_simple.o() warning 20(3): Object files or libraries with mixed multithreading (-mt) options
ld: ./fbc-int/array.o: in function `TESTS::FBC_TESTS::FBC_INT::ARRAY::STATIC_FIXED()':
(.text+0x13): undefined reference to `FBC::fb_ArrayGetDesc(FBARRAY<void>&)'
ld: (.text+0x34d): undefined reference to `FBC::fb_ArrayGetDesc(FBARRAY<void>&)'
ld: ./fbc-int/array.o: in function `TESTS::FBC_TESTS::FBC_INT::ARRAY::STATIC_EMPTY()':
(.text+0x78e): undefined reference to `FBC::fb_ArrayGetDesc(FBARRAY<void>&)'
ld: (.text+0xf6d): undefined reference to `FBC::fb_ArrayGetDesc(FBARRAY<void>&)'
ld: (.text+0x17fe): undefined reference to `FBC::fb_ArrayGetDesc(FBARRAY<void>&)'
ld: ./fbc-int/array.o:(.text+0x24b0): more undefined references to `FBC::fb_ArrayGetDesc(FBARRAY<void>&)' follow
ld: ./fbc-int/memory.o: in function `TESTS::FBC_TESTS::FBC_INT::MEMORY::CLEAR_()':
(.text+0x16): undefined reference to `_ZN3FBC6callocEmS0_'
ld: (.text+0x29): undefined reference to `_ZN3FBC6callocEmS0_'
ld: (.text+0x1af): undefined reference to `FBC::memset(void*, int, unsigned long)'
ld: (.text+0x285): undefined reference to `FBC::free(void const*)'
ld: (.text+0x28e): undefined reference to `FBC::free(void const*)'
ld: ./fbc-int/memory.o: in function `TESTS::FBC_TESTS::FBC_INT::MEMORY::ALLOCS()':
(.text+0x2ad): undefined reference to `_ZN3FBC6callocEmS0_'
ld: (.text+0x2bb): undefined reference to `FBC::malloc(unsigned long)'
ld: (.text+0x2cb): undefined reference to `FBC::realloc(void const*, unsigned long)'
ld: (.text+0x2e1): undefined reference to `_ZN3FBC6callocEmS0_'
ld: (.text+0x314): undefined reference to `FBC::memcpy(void*, void const*, unsigned long)'
ld: (.text+0x329): undefined reference to `FBC::memmove(void*, void const*, unsigned long)'
ld: (.text+0x480): undefined reference to `FBC::memset(void*, int, unsigned long)'
ld: (.text+0x490): undefined reference to `FBC::memset(void*, int, unsigned long)'
ld: (.text+0x4a3): undefined reference to `FBC::memset(void*, int, unsigned long)'
ld: (.text+0x6a1): undefined reference to `FBC::free(void const*)'
ld: (.text+0x6ad): undefined reference to `FBC::free(void const*)'
ld: (.text+0x6b6): undefined reference to `FBC::free(void const*)'
ld: (.text+0x6bf): undefined reference to `FBC::free(void const*)'
ld: ./fbc-int/memory.o: in function `TESTS::FBC_TESTS::FBC_INT::MEMORY::MEMMOVE_()':
(.text+0x6de): undefined reference to `_ZN3FBC6callocEmS0_'
ld: (.text+0x6f1): undefined reference to `_ZN3FBC6callocEmS0_'
ld: (.text+0x770): undefined reference to `FBC::memmove(void*, void const*, unsigned long)'
ld: (.text+0x8cd): undefined reference to `FBC::memmove(void*, void const*, unsigned long)'
ld: (.text+0x9b1): undefined reference to `FBC::free(void const*)'
ld: (.text+0x9ba): undefined reference to `FBC::free(void const*)'
ld: ./fbc-int/memory.o: in function `TESTS::FBC_TESTS::FBC_INT::MEMORY::USING_FBC()':
(.text+0x9d9): undefined reference to `_ZN3FBC6callocEmS0_'
ld: (.text+0x9f7): undefined reference to `FBC::realloc(void const*, unsigned long)'
ld: (.text+0xa0d): undefined reference to `_ZN3FBC6callocEmS0_'
ld: ./fbc-int/memory.o: in function `ALLOCATE':
(.text+0xa8e): undefined reference to `FBC::malloc(unsigned long)'
ld: ./fbc-int/memory.o: in function `DEALLOCATE':
(.text+0xaba): undefined reference to `FBC::free(void const*)'
make[1]: *** [unit-tests.mk:178: build_tests] Error 1



3. Failed wstring/woct.bas

Code: Select all

#include "fbcunit.bi"

SUITE( fbc_tests.wstring_.woct_ )

   TEST( long_ )
      const TEST_VAL as ulongint = &o1777777777777777777777ULL
      
      dim as ulongint      n = TEST_VAL
      dim as ulongint      digmax = 8ULL
      dim as integer      i
         
      CU_ASSERT( valulng( "&o" + woct( n ) ) = TEST_VAL )
      
      for i = 1 to ((len( n ) * 8) \ 3) + 0
          CU_ASSERT( valulng( "&o" + woct( n, i ) ) = TEST_VAL mod digmax )
          digmax *= 8
      next
      
      CU_ASSERT( valulng( "&o" + woct( n, i ) ) = TEST_VAL )
      
   END_TEST
   
   TEST( integer_ )
      const TEST_VAL = &o17777777777
      
      dim as uinteger n = TEST_VAL, digmax = 8
      dim as integer i
         
      CU_ASSERT( valuint( "&o" + woct( n ) ) = TEST_VAL )
      
      for i = 1 to ((len( n ) * 8) \ 3) + 0
          CU_ASSERT( valuint( "&o" + woct( n, i ) ) = TEST_VAL mod digmax )
          digmax *= 8
      next
      
      CU_ASSERT( valuint( "&o" + woct( n, i ) ) = TEST_VAL )
      
   END_TEST
   
   TEST( short_ )
      const TEST_VAL = &o177777
      
      dim as ushort n = TEST_VAL, digmax = 8
      dim as integer i
         
      CU_ASSERT( valuint( "&o" + woct( n ) ) = TEST_VAL )
      
      for i = 1 to ((len( n ) * 8) \ 3) + 0
          CU_ASSERT( valuint( "&o" + woct( n, i ) ) = TEST_VAL mod digmax )
          digmax *= 8
      next
      
      CU_ASSERT( valuint( "&o" + woct( n, i ) ) = TEST_VAL )
      
   END_TEST
   
   TEST( byte_ )
      const TEST_VAL = &o377
      
      dim as ubyte n = TEST_VAL, digmax = 8
      dim as integer i
         
      CU_ASSERT( valuint( "&o" + woct( n ) ) = TEST_VAL )
      
      for i = 1 to ((len( n ) * 8) \ 3) + 0
          CU_ASSERT( valuint( "&o" + woct( n, i ) ) = TEST_VAL mod digmax )
          digmax *= 8
      next
      
      CU_ASSERT( valuint( "&o" + woct( n, i ) ) = TEST_VAL )
      
   END_TEST
   
END_SUITE


errored out with

Code: Select all

fbc -c -w 3 -i fbcunit/inc -m fbc-tests -mt wstring/woct.bas
fbc -l fbcunit -p fbcunit/lib -x fbc-tests @unit-tests-obj.lst ./fbc-tests.o
./pretest/style_simple.o() warning 20(3): Object files or libraries with mixed multithreading (-mt) options
ld: ./fbc-int/array.o: in function `TESTS::FBC_TESTS::FBC_INT::ARRAY::STATIC_FIXED()':
(.text+0x13): undefined reference to `FBC::fb_ArrayGetDesc(FBARRAY<void>&)'
ld: (.text+0x34d): undefined reference to `FBC::fb_ArrayGetDesc(FBARRAY<void>&)'
ld: ./fbc-int/array.o: in function `TESTS::FBC_TESTS::FBC_INT::ARRAY::STATIC_EMPTY()':
(.text+0x78e): undefined reference to `FBC::fb_ArrayGetDesc(FBARRAY<void>&)'
ld: (.text+0xf6d): undefined reference to `FBC::fb_ArrayGetDesc(FBARRAY<void>&)'
ld: (.text+0x17fe): undefined reference to `FBC::fb_ArrayGetDesc(FBARRAY<void>&)'
ld: ./fbc-int/array.o:(.text+0x24b0): more undefined references to `FBC::fb_ArrayGetDesc(FBARRAY<void>&)' follow
ld: ./fbc-int/memory.o: in function `TESTS::FBC_TESTS::FBC_INT::MEMORY::CLEAR_()':
(.text+0x16): undefined reference to `_ZN3FBC6callocEmS0_'
ld: (.text+0x29): undefined reference to `_ZN3FBC6callocEmS0_'
ld: (.text+0x1af): undefined reference to `FBC::memset(void*, int, unsigned long)'
ld: (.text+0x285): undefined reference to `FBC::free(void const*)'
ld: (.text+0x28e): undefined reference to `FBC::free(void const*)'
ld: ./fbc-int/memory.o: in function `TESTS::FBC_TESTS::FBC_INT::MEMORY::ALLOCS()':
(.text+0x2ad): undefined reference to `_ZN3FBC6callocEmS0_'
ld: (.text+0x2bb): undefined reference to `FBC::malloc(unsigned long)'
ld: (.text+0x2cb): undefined reference to `FBC::realloc(void const*, unsigned long)'
ld: (.text+0x2e1): undefined reference to `_ZN3FBC6callocEmS0_'
ld: (.text+0x314): undefined reference to `FBC::memcpy(void*, void const*, unsigned long)'
ld: (.text+0x329): undefined reference to `FBC::memmove(void*, void const*, unsigned long)'
ld: (.text+0x480): undefined reference to `FBC::memset(void*, int, unsigned long)'
ld: (.text+0x490): undefined reference to `FBC::memset(void*, int, unsigned long)'
ld: (.text+0x4a3): undefined reference to `FBC::memset(void*, int, unsigned long)'
ld: (.text+0x6a1): undefined reference to `FBC::free(void const*)'
ld: (.text+0x6ad): undefined reference to `FBC::free(void const*)'
ld: (.text+0x6b6): undefined reference to `FBC::free(void const*)'
ld: (.text+0x6bf): undefined reference to `FBC::free(void const*)'
ld: ./fbc-int/memory.o: in function `TESTS::FBC_TESTS::FBC_INT::MEMORY::MEMMOVE_()':
(.text+0x6de): undefined reference to `_ZN3FBC6callocEmS0_'
ld: (.text+0x6f1): undefined reference to `_ZN3FBC6callocEmS0_'
ld: (.text+0x770): undefined reference to `FBC::memmove(void*, void const*, unsigned long)'
ld: (.text+0x8cd): undefined reference to `FBC::memmove(void*, void const*, unsigned long)'
ld: (.text+0x9b1): undefined reference to `FBC::free(void const*)'
ld: (.text+0x9ba): undefined reference to `FBC::free(void const*)'
ld: ./fbc-int/memory.o: in function `TESTS::FBC_TESTS::FBC_INT::MEMORY::USING_FBC()':
(.text+0x9d9): undefined reference to `_ZN3FBC6callocEmS0_'
ld: (.text+0x9f7): undefined reference to `FBC::realloc(void const*, unsigned long)'
ld: (.text+0xa0d): undefined reference to `_ZN3FBC6callocEmS0_'
ld: ./fbc-int/memory.o: in function `ALLOCATE':
(.text+0xa8e): undefined reference to `FBC::malloc(unsigned long)'
ld: ./fbc-int/memory.o: in function `DEALLOCATE':
(.text+0xaba): undefined reference to `FBC::free(void const*)'
make[1]: *** [unit-tests.mk:178: build_tests] Error 1

SARG
Posts: 1157
Joined: May 27, 2005 7:15
Location: FRANCE

Re: Gas64 (no more use of gcc, only gas) WDS / LNX

Postby SARG » Mar 22, 2020 22:59

robert wrote:Not fixed here. Same problem
Sorry for that. I don't know what happened, the source file was effectively not the good one.

Modified zip file : http://users.freebasic-portal.de/sarg/fbc64_gas64.zip

About the new issues they seem strange : not related to fbc64. Check carefully the way you run the tests.

robert wrote:SARG wrote:
The version for Linux uses libtinfo.so.5 like the original fbc. I just put the file with the source and define the path for the linker.

I do not understand this comment. Is this necessary to fix the above problem? I already have /lib64/libtinfo.so.5.
This doesn't concerne you because you compile your own version.

Nov79 did a remark that currently fb64_gas64 (exe) for Linux needs version 6 of libtinfo.so. As this version is not always existing on user's linux box and regular fbc uses version 5, now I link fb64_gas64 with version 5.
robert
Posts: 125
Joined: Aug 06, 2019 18:45

Re: Gas64 (no more use of gcc, only gas) WDS / LNX

Postby robert » Mar 23, 2020 0:27

SARG wrote:About the new issues they seem strange : not related to fbc64. Check carefully the way you run the tests.

Hi SARG:

I reinstalled fbc 1.0.8 source from Github recompiled with gcc backend and ran the unit-tests. There were no failures.

I'm not sure what to do now. My skill set with debugging is about the same level as a person searching for a needle in a haystack while wearing a blindfold. I know I should learn to use your FreeBASIC Debugger but there's only so much that one can do.
Xusinboy Bekchanov
Posts: 254
Joined: Jul 26, 2018 18:28

Re: Gas64 (no more use of gcc, only gas) WDS / LNX

Postby Xusinboy Bekchanov » Mar 23, 2020 1:48

SARG wrote:@Xusinboy
I tried to reproduce the error with the code below (copying the working of code you provided) without succes.
If possible post an example without Gtk.

I could not reproduce the error.
If you want, I can give you a compiled version with gcc and with gas. You can check the compliance.
robert
Posts: 125
Joined: Aug 06, 2019 18:45

Re: Gas64 (no more use of gcc, only gas) WDS / LNX

Postby robert » Mar 23, 2020 2:54

Hi SARG:

The three so-called error files quoted above were not the culprits. Those were okay.

The problem is with the last file in the unit-tests, fbc-tests.bas.

I don't understand why it compiles with the gcc backend but not gas64.

Code: Select all

/'
   fbc-tests.bas
   
   test suite main entry point
'/

#include once "fbcunit.bi"

dim opt_help as boolean = false
dim opt_verbose as boolean = false
dim opt_show_summary as boolean = true
dim opt_brief_summary as boolean = false
dim opt_hide_cases as boolean = false
dim opt_xml_report as boolean = false
dim opt_xml_filename as string = ""
dim opt_no_error as boolean = false

dim i as integer = 1

while command(i) > ""

   select case lcase(command(i))
   case "-h", "-help", "--help"
      opt_help = true

   case "-v", "--verbose"
      opt_verbose = true

   case "--no-error"
      opt_no_error = true

   case "--xml"
      i += 1
      opt_xml_report = true
      opt_xml_filename = command(i)

      if( opt_xml_filename = "" ) then
         print "expected filename after '" & command(i-1) & "'"
         end 1
      end if

   case "--no-summary"
      opt_show_summary = false

   case "--brief-summary"
      opt_brief_summary = true

   case "--hide-cases"
      opt_hide_cases = true

   case else
      print "Unrecognized option '" & command(i) & "'"
      end 1

   end select

   i += 1

wend

if( opt_help ) then
   print "usage: fbc-tests [options]"
   print
   print "options:"
   print "   -h, -help, --help    show this help information"
   print "   -v, --verbose        be verbose"
   print "   --xml filename       write test results to xml format for filename"
   print "   --no-summary         don't show the summary (default is to show it)"
   print "   --no-error           don't exit with error code even if tests failed"
   print "   --brief-summary      only show failures in the summary"
   print "   --hide-cases         don't show the failed cases"
   print

   '' exit with an error code
   end 1
end if

dim passed as boolean = false

'' check the fbcunit internal state
'' at this point all the module constructors should have been
'' called and fbcunit should know about all the suites & tests
'' it can run

if( fbcu.check_internal_state() = false ) then
   print "fbc-tests: fbcu.check_internal_state() failed"
   end 1
end if

'' set extra options
fbcu.setBriefSummary( opt_brief_summary )
fbcu.setHideCases( opt_hide_cases )

'' run the tests
passed = fbcu.run_tests( opt_show_summary, opt_verbose )


'' write xml report
if( opt_xml_report ) then
   if( fbcu.write_report_xml( opt_xml_filename ) = false ) then
      '' even if the tests passed, but writing the report
      '' failed, end with an exit code
      end 1
   end if
end if


'' only return exit code = 0 if all tests passed and no other errors
'' or if the '-no-error' option was given, suspress the error code
if( passed or opt_no_error ) then
   end 0
end if

'' failed
end 1

errored out with

Code: Select all

fbc -l fbcunit -p fbcunit/lib -x fbc-tests @unit-tests-obj.lst ./fbc-tests.o
./pretest/style_simple.o() warning 20(3): Object files or libraries with mixed multithreading (-mt) options
ld: ./fbc-int/array.o: in function `TESTS::FBC_TESTS::FBC_INT::ARRAY::STATIC_FIXED()':
(.text+0x13): undefined reference to `FBC::fb_ArrayGetDesc(FBARRAY<void>&)'
ld: (.text+0x34d): undefined reference to `FBC::fb_ArrayGetDesc(FBARRAY<void>&)'
ld: ./fbc-int/array.o: in function `TESTS::FBC_TESTS::FBC_INT::ARRAY::STATIC_EMPTY()':
(.text+0x78e): undefined reference to `FBC::fb_ArrayGetDesc(FBARRAY<void>&)'
ld: (.text+0xf6d): undefined reference to `FBC::fb_ArrayGetDesc(FBARRAY<void>&)'
ld: (.text+0x17fe): undefined reference to `FBC::fb_ArrayGetDesc(FBARRAY<void>&)'
ld: ./fbc-int/array.o:(.text+0x24b0): more undefined references to `FBC::fb_ArrayGetDesc(FBARRAY<void>&)' follow
ld: ./fbc-int/memory.o: in function `TESTS::FBC_TESTS::FBC_INT::MEMORY::CLEAR_()':
(.text+0x16): undefined reference to `_ZN3FBC6callocEmS0_'
ld: (.text+0x29): undefined reference to `_ZN3FBC6callocEmS0_'
ld: (.text+0x1af): undefined reference to `FBC::memset(void*, int, unsigned long)'
ld: (.text+0x285): undefined reference to `FBC::free(void const*)'
ld: (.text+0x28e): undefined reference to `FBC::free(void const*)'
ld: ./fbc-int/memory.o: in function `TESTS::FBC_TESTS::FBC_INT::MEMORY::ALLOCS()':
(.text+0x2ad): undefined reference to `_ZN3FBC6callocEmS0_'
ld: (.text+0x2bb): undefined reference to `FBC::malloc(unsigned long)'
ld: (.text+0x2cb): undefined reference to `FBC::realloc(void const*, unsigned long)'
ld: (.text+0x2e1): undefined reference to `_ZN3FBC6callocEmS0_'
ld: (.text+0x314): undefined reference to `FBC::memcpy(void*, void const*, unsigned long)'
ld: (.text+0x329): undefined reference to `FBC::memmove(void*, void const*, unsigned long)'
ld: (.text+0x480): undefined reference to `FBC::memset(void*, int, unsigned long)'
ld: (.text+0x490): undefined reference to `FBC::memset(void*, int, unsigned long)'
ld: (.text+0x4a3): undefined reference to `FBC::memset(void*, int, unsigned long)'
ld: (.text+0x6a1): undefined reference to `FBC::free(void const*)'
ld: (.text+0x6ad): undefined reference to `FBC::free(void const*)'
ld: (.text+0x6b6): undefined reference to `FBC::free(void const*)'
ld: (.text+0x6bf): undefined reference to `FBC::free(void const*)'
ld: ./fbc-int/memory.o: in function `TESTS::FBC_TESTS::FBC_INT::MEMORY::MEMMOVE_()':
(.text+0x6de): undefined reference to `_ZN3FBC6callocEmS0_'
ld: (.text+0x6f1): undefined reference to `_ZN3FBC6callocEmS0_'
ld: (.text+0x770): undefined reference to `FBC::memmove(void*, void const*, unsigned long)'
ld: (.text+0x8cd): undefined reference to `FBC::memmove(void*, void const*, unsigned long)'
ld: (.text+0x9b1): undefined reference to `FBC::free(void const*)'
ld: (.text+0x9ba): undefined reference to `FBC::free(void const*)'
ld: ./fbc-int/memory.o: in function `TESTS::FBC_TESTS::FBC_INT::MEMORY::USING_FBC()':
(.text+0x9d9): undefined reference to `_ZN3FBC6callocEmS0_'
ld: (.text+0x9f7): undefined reference to `FBC::realloc(void const*, unsigned long)'
ld: (.text+0xa0d): undefined reference to `_ZN3FBC6callocEmS0_'
ld: ./fbc-int/memory.o: in function `ALLOCATE':
(.text+0xa8e): undefined reference to `FBC::malloc(unsigned long)'
ld: ./fbc-int/memory.o: in function `DEALLOCATE':
(.text+0xaba): undefined reference to `FBC::free(void const*)'

SARG
Posts: 1157
Joined: May 27, 2005 7:15
Location: FRANCE

Re: Gas64 (no more use of gcc, only gas) WDS / LNX

Postby SARG » Mar 23, 2020 14:15

@robert
the errors come from array.bas located in fbc-int folder. It seems that libs are not correctly linked or not found. But why ? I have no idea.
Do you use gbc64_gas64 for compiling the fbc unit testing library ? I remember having problems if not doing that.

@xusinboy
Did you test with the code I provided ?
Thank you but I can do nothing with the 2 exes.
However see what is the value returned by G_callback(@ondraw) can give an idea of the problem. But not sure it's possible.

Even I can't run the executable I'll check again the generated asm file.
Xusinboy Bekchanov
Posts: 254
Joined: Jul 26, 2018 18:28

Re: Gas64 (no more use of gcc, only gas) WDS / LNX

Postby Xusinboy Bekchanov » Mar 23, 2020 15:20

SARG wrote:@xusinboy
Did you test with the code I provided ?

Yes it works.

SARG wrote:Thank you but I can do nothing with the 2 exes.
However see what is the value returned by G_callback(@ondraw) can give an idea of the problem. But not sure it's possible.

fbc64_gas64 will return 4203395, and gcc will return 4203554.

SARG wrote:Even I can't run the executable I'll check again the generated asm file.

Ok.
robert
Posts: 125
Joined: Aug 06, 2019 18:45

Re: Gas64 (no more use of gcc, only gas) WDS / LNX

Postby robert » Mar 23, 2020 21:08

SARG wrote:@robert
the errors come from array.bas located in fbc-int folder. It seems that libs are not correctly linked or not found. But why ? I have no idea.
Do you use gbc64_gas64 for compiling the fbc unit testing library ? I remember having problems if not doing that.

Yes, fbc64_GAS64 is used for compiling the fbc unit testing library.

I don't know either. Perhaps the library is malformed?

Anyway after running the make unit-tests to the error on the fbc-tests compile due to the problems with the array and memory objects, I copied a fbc-tests executable from the gcc backend fbc 1.0.8 and used that to continue the unit-tests on the objects produced by fbc64_GAS64. Success ! No failures.

The fbc-tests compile must be fixed. I was just thinking that I could copy the fbc unit testing library from the gcc backend fbc and see if that allows the compile of fbc-tests. O.K. we do that.
robert
Posts: 125
Joined: Aug 06, 2019 18:45

Re: Gas64 (no more use of gcc, only gas) WDS / LNX

Postby robert » Mar 24, 2020 0:12

robert wrote:
SARG wrote:@robert
The fbc-tests compile must be fixed. I was just thinking that I could copy the fbc unit testing library from the gcc backend fbc and see if that allows the compile of fbc-tests. O.K. we do that.


Doesn't seem to be the library. Same errors with the gcc backend compiled libfbcunit.a.

Return to “Projects”

Who is online

Users browsing this forum: No registered users and 7 guests