For Programmers: Free Programming Magazines  


Home > Archive > Fortran > June 2004 > Re: Turning compiler optimizations off causes segmentation fault









You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

 

Author Re: Turning compiler optimizations off causes segmentation fault
glen herrmannsfeldt

2004-06-10, 3:58 pm

Richard Maine wrote:

(big snip)

> But remember that X *IS* (aliased to anyway) the up pointer in node 2.
> Thus the above statement nullifies X, behind your back as it were.
> Aliasing is tricky that way. Thus your following x%p is suddenly
> invalid.


> I think that what you want is, in the call to the rotate routine,
> pass a temporary pointer instead of x%p%p. I.E instead of


> CALL LeftRotateRBTree(Tree, x%p%p)


> do


> y => x%p%p
> CALL LeftRotateRBTree(Tree, y)


I wonder if this is a translation of a C program, with the
call by value method of passing arguments.

-- glen

Sponsored Links







Also available: Server administration forum archive | Web Design forum archive | Software forum archive | Hardware reviews archive

Copyright 2008 codecomments.com