Quantcast
Channel: Intel® Fortran Composer XE
Viewing all articles
Browse latest Browse all 1424

Pointer association and red-black trees

$
0
0

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

AllegatoDimensione
Downloadrbtree.tgz7.01 KB

Viewing all articles
Browse latest Browse all 1424

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>