This is the mail archive of the
fortran@gcc.gnu.org
mailing list for the GNU Fortran project.
correct fix for aliasing bugs
- From: howarth at bromo dot msbb dot uc dot edu (Jack Howarth)
- To: fortran at gcc dot gnu dot org
- Date: Thu, 16 Mar 2006 15:48:51 -0500 (EST)
- Subject: correct fix for aliasing bugs
Andrew Pinski clued me into the fortran aliasing bug of passing
the same variable to two different arguments in a subroutine call.
This appears to be abused in xplor-nih with calls of the form...
xrama.f: CALL RD2DEG(CURANG1, CURANG1)
to the subroutine...
SUBROUTINE RD2DEG( RAD, DEG )
...which converts angles from radians to degrees. Is it sufficient to
do something like...
CALL RD2DEG((CURANG1), (CURANG1))
...converting the arguments to temporary variables to work around
this fortran aliasing violation? Or do I have to actually use
different variables?
Jack