I'm trying to implement a red-black tree in Fortran. Rather than starting from scratch I'm translating some c-code I found on the internet. Both the original code and my Fortran versions are attached together with a Makefile; the c version works as I expect.
The problem I'm having is that line 373
newn%parent => oldn%parent
seems to corrupt the contents of oldn but not on the first invocation. Tested with 14.0.1.139.
Is this a compiler bug, a typo in my code or something else. I've been thinking about this all afternoon and just can't see what the problem is. Any help greatly appreciated.
Simon