public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
From: "jamborm at gcc dot gnu.org" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug ipa/113359] [13 Regression] LTO miscompilation of ceph on aarch64
Date: Mon, 19 Feb 2024 15:31:41 +0000	[thread overview]
Message-ID: <bug-113359-4-9TUiLbn9qK@http.gcc.gnu.org/bugzilla/> (raw)
In-Reply-To: <bug-113359-4@http.gcc.gnu.org/bugzilla/>

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=113359

--- Comment #15 from Martin Jambor <jamborm at gcc dot gnu.org> ---
Created attachment 57462
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=57462&action=edit
Simple testcase (needs disabling early - and only early - SRA)

This is a simpler testcase which exhibits the problem on x86_64-linux
and current master.  Steps to reproduce:

$ ~/gcc/trunk/inst/bin/gcc -O2 -fno-strict-aliasing -fno-ipa-cp 
--disable-tree-esra -flto pr113359.c -c -o 1.o
cc1: note: disable pass tree-esra for functions in the range of [0, 4294967295]

$ ~/gcc/trunk/inst/bin/gcc -O2 -fno-strict-aliasing -fno-ipa-cp 
--disable-tree-esra -flto -DFILE2 pr113359.c -c -o 2.o
cc1: note: disable pass tree-esra for functions in the range of [0, 4294967295]

$ ~/gcc/trunk/inst/bin/gcc -flto 1.o 2.o -o test.exe                            

$ ./test.exe 
Aborted (core dumped)


If you add -fno-ipa-icf to the "compilation" commands, the test will
pass.

Late (post ICF) intra-procedural SRA is necessary to exhibit the
problem.  On the other hand, early SRA must be suppressed or it will
scalarize the aggregate assignment too early and the results will look
different to IPA-ICF.  Instead of using --disable-tree-esra we could
pass the address of tmp in both geta() and getb() to an empty function
coming from a third compilation unit.

Disabling strict aliasing is also necessary to show the problem, with
strict aliasing IPA-ICF takes the alias class of types into acount
when hashing and considers geta() and getb() different from the start.

  parent reply	other threads:[~2024-02-19 15:31 UTC|newest]

Thread overview: 37+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-01-12 18:31 [Bug tree-optimization/113359] New: " jakub at gcc dot gnu.org
2024-01-12 18:31 ` [Bug tree-optimization/113359] " jakub at gcc dot gnu.org
2024-01-12 18:32 ` jakub at gcc dot gnu.org
2024-01-12 18:32 ` jakub at gcc dot gnu.org
2024-01-12 18:33 ` jakub at gcc dot gnu.org
2024-01-12 18:34 ` [Bug ipa/113359] " jakub at gcc dot gnu.org
2024-01-12 19:54 ` jakub at gcc dot gnu.org
2024-01-12 19:56 ` jakub at gcc dot gnu.org
2024-01-12 20:29 ` pinskia at gcc dot gnu.org
2024-01-15  8:24 ` rguenth at gcc dot gnu.org
2024-02-05 21:48 ` jamborm at gcc dot gnu.org
2024-02-06  8:29 ` rguenth at gcc dot gnu.org
2024-02-06 10:00 ` hubicka at gcc dot gnu.org
2024-02-06 12:39 ` jakub at gcc dot gnu.org
2024-02-06 12:47 ` rguenther at suse dot de
2024-02-07 17:01 ` jamborm at gcc dot gnu.org
2024-02-19 15:31 ` jamborm at gcc dot gnu.org [this message]
2024-03-09 21:44 ` pinskia at gcc dot gnu.org
2024-03-09 21:45 ` sjames at gcc dot gnu.org
2024-03-09 21:45 ` [Bug ipa/113359] [13/14 " pinskia at gcc dot gnu.org
2024-03-15 15:02 ` law at gcc dot gnu.org
2024-03-15 15:13 ` avieira at gcc dot gnu.org
2024-03-15 15:25 ` law at gcc dot gnu.org
2024-03-26 10:42 ` [Bug ipa/113359] [13/14 Regression] LTO miscompilation of ceph on aarch64 and x86_64 rguenth at gcc dot gnu.org
2024-03-28  8:59 ` jamborm at gcc dot gnu.org
2024-04-04 11:40 ` hubicka at gcc dot gnu.org
2024-04-04 21:22 ` jamborm at gcc dot gnu.org
2024-04-08 16:57 ` cvs-commit at gcc dot gnu.org
2024-04-08 16:59 ` jamborm at gcc dot gnu.org
2024-04-08 17:01 ` [Bug ipa/113359] [13 " jakub at gcc dot gnu.org
2024-04-09  6:33 ` rguenth at gcc dot gnu.org
2024-05-14 11:22 ` cvs-commit at gcc dot gnu.org
2024-05-14 11:58 ` jamborm at gcc dot gnu.org
2024-05-14 12:00 ` jamborm at gcc dot gnu.org
2024-05-17 14:29 ` dkm at gcc dot gnu.org
2024-05-20 15:10 ` jamborm at gcc dot gnu.org
2024-05-20 15:13 ` dkm at gcc dot gnu.org

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=bug-113359-4-9TUiLbn9qK@http.gcc.gnu.org/bugzilla/ \
    --to=gcc-bugzilla@gcc.gnu.org \
    --cc=gcc-bugs@gcc.gnu.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).