Dear CRAN maintainers,

I am submitting an update to "rexpokit", rexpokit 0.26.6.4. This is a slight revision of the previous 0.26.6.3 submission, fixing remaining LTO issues, which this time I was able to reproduce and eliminate.

This compiles without errors/warnings/notes on newest R, gfortran 9.1.0, and on r-devel, r-release, and r-old on WinBuilder.

(PS: Thanks for the previous email Uwe -- I was finally able to reproduce the LTO warnings on my Mac OSX 10.14, it required compiling gcc/gfortran 9.1 and modifying the commands below. Unlike the few online discussions of LTO "warning: type of xxxx does not match original declaration [-Wlto-type-mismatch]", the issue here was not an implicit argument when C calls FORTRAN, it involved implicit changes of type in some of the inputs to ZSWAP and ZAXPX. The fix was to put any calculations producing the input arguments on separate lines, and make sure they were forced to have the type matching the argument types specified in the *.optimized files produced by compiling with the "-fdump-tree-all" flag.)

Thanks very much for your time,

Sincerely,
Nick Matzke



Uwe Ligges
1:20 AM (14 hours ago)
to CRAN, me


Thanks, but this still gives:

* installing *source* package â€˜rexpokitâ€™ ...
** using staged installation
** libs
gfortran-8  -fno-optimize-sibling-calls  -fpic  -g -O2 -Wall -pedantic 
-mtune=native -flto -c lapack/blas_mod.f -o lapack/blas_mod.o
gfortran-8  -fno-optimize-sibling-calls  -fpic  -g -O2 -Wall -pedantic 
-mtune=native -flto -c lapack/lapack.f -o lapack/lapack.o
gfortran-8  -fno-optimize-sibling-calls  -fpic  -g -O2 -Wall -pedantic 
-mtune=native -flto -c mataid.f -o mataid.o
gfortran-8  -fno-optimize-sibling-calls  -fpic  -g -O2 -Wall -pedantic 
-mtune=native -flto -c my_expokit.f -o my_expokit.o
gfortran-8  -fno-optimize-sibling-calls  -fpic  -g -O2 -Wall -pedantic 
-mtune=native -flto -c my_matexp.f -o my_matexp.o
gfortran-8  -fno-optimize-sibling-calls  -fpic  -g -O2 -Wall -pedantic 
-mtune=native -flto -c itscale5.f -o itscale5.o
g++-8  -std=gnu++11 -I"/home/Hornik/tmp/R-d-gcc-LTO/include" -DNDEBUG 
-I"/home/Hornik/lib/R/Library/3.7/x86_64-linux-gnu/Rcpp/include" 
-I/usr/local/include -DUSE_TYPE_CHECKING_STRICT  -fpic  -g -O2 -Wall 
-pedantic -flto -c coo.cpp -o coo.o
g++-8  -std=gnu++11 -I"/home/Hornik/tmp/R-d-gcc-LTO/include" -DNDEBUG 
-I"/home/Hornik/lib/R/Library/3.7/x86_64-linux-gnu/Rcpp/include" 
-I/usr/local/include -DUSE_TYPE_CHECKING_STRICT  -fpic  -g -O2 -Wall 
-pedantic -flto -c wrappers.cpp -o wrappers.o
g++-8 -std=gnu++11 -shared -L/home/Hornik/tmp/R-d-gcc-LTO/lib -Wl,-O1 -o 
rexpokit.so lapack/blas_mod.o lapack/lapack.o mataid.o my_expokit.o 
my_matexp.o itscale5.o coo.o wrappers.o 
-L/home/Hornik/tmp/R-d-gcc-LTO/lib -lRlapack 
-L/home/Hornik/tmp/R-d-gcc-LTO/lib -lRblas -lgfortran -lm -lquadmath 
-lgfortran -lm -lquadmath -L/home/Hornik/tmp/R-d-gcc-LTO/lib -lR
lapack/lapack.f:1179: warning: type of â€˜zswapyâ€™ does not match 
original declaration [-Wlto-type-mismatch]
                 call zswapy(k-1,b(k),a(1,k),1,b(1),1)

lapack/blas_mod.f:961: note: â€˜zswapyâ€™ was previously declared here
        subroutine  zswapy (n,m,zx,incx,zy,incy)

lapack/blas_mod.f:961: note: code may be misoptimized unless 
-fno-strict-aliasing is used
my_expokit.f:1147: warning: type of â€˜zswapxâ€™ does not match original 
declaration [-Wlto-type-mismatch]
            call ZSWAPX(m-i+1,wsp(ih+(i-1)*m+i-1),m,wsp(ih+(i-1)*m+i),m)

lapack/blas_mod.f:926: note: â€˜zswapxâ€™ was previously declared here
        subroutine  zswapx (n,zx,incx,zy,incy)

lapack/blas_mod.f:926: note: code may be misoptimized unless 
-fno-strict-aliasing is used
my_expokit.f:1154: warning: type of â€˜zaxpxâ€™ does not match original 
declaration [-Wlto-type-mismatch]
           call ZAXPX(m-i,tmpc,wsp(ih+i*m+i-1),m,wsp(ih+i*m+i),m )

lapack/blas_mod.f:443: note: â€˜zaxpxâ€™ was previously declared here
        subroutine zaxpx(n,za,zx,incx,zy,incy)

lapack/blas_mod.f:443: note: code may be misoptimized unless 
-fno-strict-aliasing is used


Please fix and resubmit.

Best,
Uwe Ligges