I've merged all the pieces together so you can see it as one file. No optimizing involved and the code is the standard uIP TCP/IP stack. It didn't used to be anything like this bad but now takes 32.5GB of RAM
sdcc -c -mz80 1.c
(latest sdcc from svn built for x86-64 built without treedec)
This also happens when using -mstm8. I notice that if you add the --no-gcse switch, it "only" uses about 1.3GB
With [r10431] the memory usage is down to about 2.0 GB, or 258 MB when using --nogcse. I will continue to work on this, but I thought this was enough of an improvement that it might be useful to you as-is.
Thanks a lot - that brings it back down to sanity.