This is the mail archive of the fortran@gcc.gnu.org mailing list for the GNU Fortran project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]