https://gcc.gnu.org/bugzilla/show_bug.cgi?id=68649
Joost VandeVondele <Joost.VandeVondele at mat dot ethz.ch> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |hubicka at gcc dot gnu.org, | |Joost.VandeVondele at mat dot ethz | |.ch Summary|note: code may be |[6 Regression] note: code |misoptimized unless |may be misoptimized unless |-fno-strict-aliasing is |-fno-strict-aliasing is |used |used --- Comment #1 from Joost VandeVondele <Joost.VandeVondele at mat dot ethz.ch> --- testcase > cat foo.f90 SUBROUTINE s8(a8,b8) REAL*8 :: a8(16),b8(4,4) a8=RESHAPE(b8,(/16/)) b8=RESHAPE(a8,(/4,4/)) END SUBROUTINE REAL*8 :: a8(16),b8(4,4) CALL RANDOM_NUMBER(b8) CALL s8(a8,b8) WRITE(6,*) MAXVAL(a8),MAXVAL(b8) END > gfortran -flto -O3 foo.f90 foo.f90:3:0: warning: type of ‘_gfortran_reshape_r8’ does not match original declaration [-Wlto-type-mismatch] a8=RESHAPE(b8,(/16/)) foo.f90:4:0: note: ‘_gfortran_reshape_r8’ was previously declared here b8=RESHAPE(a8,(/4,4/)) foo.f90:4:0: note: code may be misoptimized unless -fno-strict-aliasing is used