public inbox for fortran@gcc.gnu.org
 help / color / mirror / Atom feed
From: Jeff Law <jeffreyalaw@gmail.com>
To: Toon Moene <toon@moene.org>, gcc mailing list <gcc@gcc.gnu.org>
Cc: gfortran <fortran@gcc.gnu.org>
Subject: Re: Test with an lto-build of libgfortran.
Date: Wed, 27 Sep 2023 15:48:02 -0600	[thread overview]
Message-ID: <b18a5ac5-62e3-44fe-807b-2cbabe116c7a@gmail.com> (raw)
In-Reply-To: <9e347fa4-1940-46c6-a5c9-899cf5a7ae85@moene.org>



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

  reply	other threads:[~2023-09-27 21:48 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-09-27 18:21 Toon Moene
2023-09-27 21:48 ` Jeff Law [this message]
2023-09-28  6:25   ` Richard Biener
2023-09-28  6:29     ` Andrew Pinski
2023-09-28  7:29     ` Tobias Burnus
2023-09-28  9:51       ` Jakub Jelinek
2023-09-28 11:00         ` Tobias Burnus
2023-09-28 11:02           ` Jakub Jelinek
2023-09-28  5:33 ` Thomas Koenig
2023-09-28 19:03   ` Toon Moene
2023-09-28 19:26     ` Jakub Jelinek
2023-09-28 19:59       ` Toon Moene
2023-09-28 20:02         ` David Edelsohn
2023-09-29 10:26         ` Andrew Stubbs
2023-09-29  6:03       ` Thomas Koenig

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=b18a5ac5-62e3-44fe-807b-2cbabe116c7a@gmail.com \
    --to=jeffreyalaw@gmail.com \
    --cc=fortran@gcc.gnu.org \
    --cc=gcc@gcc.gnu.org \
    --cc=toon@moene.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).