Does your description refer to the compiler's output with or without the command line switch --stack-auto?
I am asking, because section 3.1.1 of the manual (Standard-Compliance: ISO C90 and ANSI C89) says:

mcs51, ds390, hc08, s08, pdk13, pdk14, pdk15 and mos6502 ports: functions are not reentrant unless explicitly declared as such or --stack-auto is specified.

Either way, thanks for your description of the current behavior.

EDIT: Silly me misread pdk as pic, but a note on pic could be added there.

 

Last edit: Benedikt Freisen 2023-05-08