Posts: 35
	Threads: 2
	Joined: Oct 2018
	
Reputation: 
8
	 
 
	
	
		UPDATE:
Wrote my first test routine.  The compiler segfaults at shutdown but generates the correct code.
build instructions:
make -j
./tester
cd runtime
make
./main
It should execute the equivalent of the following BASIC:
v=2
Print v
End
	
	
	
	
	
 
 
	
	
	
		
	Posts: 35
	Threads: 2
	Joined: Oct 2018
	
Reputation: 
8
	 
 
	
	
		I've just thrown out a half of a week's worth of work over wrong smart-pointers.  Now I'm starting over from my last commit.
	
	
	
	
	
 
 
	
	
	
		
	Posts: 246
	Threads: 48
	Joined: Jun 2015
	
Reputation: 
4
	 
 
	
	
		That's why I don't use  c or c++, basic is fine for me.
	
	
	
	
	
 
 
	
	
	
		
	Posts: 35
	Threads: 2
	Joined: Oct 2018
	
Reputation: 
8
	 
 
	
		
		
		03-29-2021, 01:54 PM 
(This post was last modified: 03-29-2021, 02:07 PM by SamuraiCrow.)
		
	 
	
		Update:
After throwing out most of the smart pointers and replacing them with conventional raw pointers and destructors, not only is the segfault gone but the code is about 40k smaller under Linux!  Now testing under Haiku!
SUCCESS!
82k executable on Haiku beta2 under GCC 8.x and runs.
	
	
	
	
	
 
 
	
	
	
		
	Posts: 35
	Threads: 2
	Joined: Oct 2018
	
Reputation: 
8
	 
 
	
	
		Update:  I've run into a corner-case where if a variable is used twice in the same expression, it will get double-free conditioned.  This will take some thought.