public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
From: Richard Biener <richard.guenther@gmail.com>
To: FX Coudert <fxcoudert@gmail.com>
Cc: gcc-patches@gcc.gnu.org, Iain Sandoe <iains.gcc@gmail.com>
Subject: Re: [PATCH] Testsuite, LTO: silence warning to make test pass on Darwin
Date: Mon, 21 Aug 2023 09:26:35 +0200	[thread overview]
Message-ID: <CAFiYyc1uMF3TOjhHVBeEcho9Ewoth7t-76eAqJrWduR4Rn_PYA@mail.gmail.com> (raw)
In-Reply-To: <A2FB735F-882D-4F5E-96A4-DA2F79084F11@gmail.com>

On Sun, Aug 20, 2023 at 12:24 PM FX Coudert via Gcc-patches
<gcc-patches@gcc.gnu.org> wrote:
>
> Hi,
>
> On darwin (both x86_64-apple-darwin and aarch64-apple-darwin) we see the following test failure:
>
> FAIL: gcc.dg/lto/20091013-1 c_lto_20091013-1_2.o assemble, -fPIC -r -nostdlib -O2 -flto
>
> which is due to this extra warning:
>
> In function 'fontcmp',
>     inlined from 'find_in_cache' at /tmp/gcc-darwin-arm64/gcc/testsuite/gcc.dg/lto/20091013-1_2.c:140:13,
>     inlined from 'WineEngCreateFontInstance' at /tmp/gcc-darwin-arm64/gcc/testsuite/gcc.dg/lto/20091013-1_2.c:160:15:
> /tmp/gcc-darwin-arm64/gcc/testsuite/gcc.dg/lto/20091013-1_2.c:107:8: warning: 'memcmp' specified bound 4 exceeds source size 0 [-Wst
> ringop-overread]
> /tmp/gcc-darwin-arm64/gcc/testsuite/gcc.dg/lto/20091013-1_2.c: In function 'WineEngCreateFontInstance':
> /tmp/gcc-darwin-arm64/gcc/testsuite/gcc.dg/lto/20091013-1_2.c:66:20: note: source object allocated here
>
> Now, the main file for the test has:
>
> /* { dg-extra-ld-options "-flinker-output=nolto-rel -Wno-stringop-overread" } */
>
> and I believe the intent of -Wno-stringop-overread is to silence this warning, but that only applies to the linker, and the warning on darwin is produced by the compiler (in addition to the linker). Adding the flag to the compilation of the source file makes the test pass on darwin.

In the end this is because darwin is -ffat-lto-objects and not using
the linker plugin(?)

> OK to commit?

OK.

Thanks,
Richard.

> FX
>
>

      reply	other threads:[~2023-08-21  7:28 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-08-20 10:24 FX Coudert
2023-08-21  7:26 ` Richard Biener [this message]

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=CAFiYyc1uMF3TOjhHVBeEcho9Ewoth7t-76eAqJrWduR4Rn_PYA@mail.gmail.com \
    --to=richard.guenther@gmail.com \
    --cc=fxcoudert@gmail.com \
    --cc=gcc-patches@gcc.gnu.org \
    --cc=iains.gcc@gmail.com \
    /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).