Test with an lto-build of libgfortran.
Jeff Law
jeffreyalaw@gmail.com
Wed Sep 27 21:48:02 GMT 2023
On 9/27/23 12:21, Toon Moene wrote:
>
> The lto-ing of libgfortran did succeed, because I did get a new warning:
>
> gfortran -O3 -flto -flto-partition=none -static -o xlintstrfz zchkrfp.o
> zdrvrfp.o zdrvrf1.o zdrvrf2.o zdrvrf3.o zdrvrf4.o zerrrfp.o zlatb4.o
> zlaipd.o zlarhs.o zsbmv.o zget04.o zpot01.o zpot03.o zpot02.o chkxer.o
> xerbla.o alaerh.o aladhd.o alahd.o alasvm.o ../../libtmglib.a
> ../../liblapack.a ../../librefblas.a
> In function 'xtoa_big',
> inlined from 'write_z' at
> /home/toon/compilers/gcc/libgfortran/io/write.c:1296:11,
> inlined from 'formatted_transfer_scalar_write' at
> /home/toon/compilers/gcc/libgfortran/io/transfer.c:2136:4:
> /home/toon/compilers/gcc/libgfortran/io/write.c:1222:6: warning: writing
> 1 byte into a region of size 0 [-Wstringop-overflow=]
> 1222 | *q = '\0';
> | ^
> /home/toon/compilers/gcc/libgfortran/io/write.c: In function
> 'formatted_transfer_scalar_write':
> /home/toon/compilers/gcc/libgfortran/io/write.c:1291:8: note: at offset
> [34, 4294967294] into destination object 'itoa_buf' of size 33
> 1291 | char itoa_buf[GFC_XTOA_BUF_SIZE];
> | ^
>
> which was (of course) not given with a non-lto libgfortran.
Yea. This certainly can happen with LTO. These warnings would
definitely be something worth investigating.
Essentially the inlining enabled by LTO can expose a different set of
diagnostics.
Jeff
More information about the Gcc
mailing list