public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
From: "jakub at gcc dot gnu.org" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug lto/114574] [14 regression] ICE when building curl with LTO (fld_incomplete_type_of, at ipa-free-lang-data.cc:257) since r14-9763
Date: Fri, 19 Apr 2024 08:20:24 +0000	[thread overview]
Message-ID: <bug-114574-4-VzEjmwN5UC@http.gcc.gnu.org/bugzilla/> (raw)
In-Reply-To: <bug-114574-4@http.gcc.gnu.org/bugzilla/>

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

--- Comment #31 from Jakub Jelinek <jakub at gcc dot gnu.org> ---
I've tried to construct a wrong-code testcase, but so far haven't been
successful.
In e.g.
struct S { int s; } s;
struct T { long l; } t;

const struct S *
foo (const struct S **p, const struct T **q)
{
  *p = &s;
  *q = &t;
  return *p;
}
fre1 optimizes the return *p to return &s;
So I've tried
[[gnu::always_inline]] static inline const void *
foo (void *x, bool y)
{
  const struct S **p = (const struct S **) x;
  struct S { int s; };
  static struct S s;
  if (y)
    *p = &s;
  return *p;
}

[[gnu::always_inline]] static inline void
bar (void *x)
{
  const struct S **q = (const struct S **) x;
  struct S { int s; };
  static struct S s;
  *q = &s;
}

const void *
baz (void *x, void *y)
{
  foo (x, true);
  bar (y);
  return foo (x, false);
}
where without the posted patch I think the TYPE_CANONICAL on const struct S*
should be wrong in the bar function, but strangely we don't optimize it.

  parent reply	other threads:[~2024-04-19  8:20 UTC|newest]

Thread overview: 37+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-04-03 12:42 [Bug lto/114574] New: [14 regression] ICE when building curl with LTO (internal compiler error: in fld_incomplete_type_of, at ipa-free-lang-data.cc:257) sjames at gcc dot gnu.org
2024-04-03 13:07 ` [Bug lto/114574] [14 regression] ICE when building curl with LTO (fld_incomplete_type_of, " sjames at gcc dot gnu.org
2024-04-03 13:30 ` sjames at gcc dot gnu.org
2024-04-03 14:15 ` [Bug lto/114574] [14 regression] ICE when building curl with LTO (fld_incomplete_type_of, at ipa-free-lang-data.cc:257) since r14-9763 jakub at gcc dot gnu.org
2024-04-03 15:51 ` jakub at gcc dot gnu.org
2024-04-03 15:57 ` jakub at gcc dot gnu.org
2024-04-03 18:02 ` uecker at gcc dot gnu.org
2024-04-04  5:29 ` uecker at gcc dot gnu.org
2024-04-04  6:14 ` uecker at gcc dot gnu.org
2024-04-04  6:46 ` jakub at gcc dot gnu.org
2024-04-04  7:07 ` uecker at gcc dot gnu.org
2024-04-04  7:18 ` rguenth at gcc dot gnu.org
2024-04-04  7:21 ` jakub at gcc dot gnu.org
2024-04-04  7:48 ` muecker at gwdg dot de
2024-04-04  7:57 ` muecker at gwdg dot de
2024-04-04 13:21 ` muecker at gwdg dot de
2024-04-05  5:16 ` muecker at gwdg dot de
2024-04-05  7:12 ` jakub at gcc dot gnu.org
2024-04-05  7:38 ` muecker at gwdg dot de
2024-04-05  7:45 ` jakub at gcc dot gnu.org
2024-04-05  7:51 ` muecker at gwdg dot de
2024-04-05  7:58 ` jakub at gcc dot gnu.org
2024-04-05  8:40 ` jakub at gcc dot gnu.org
2024-04-05 10:17 ` cvs-commit at gcc dot gnu.org
2024-04-06  5:46 ` xry111 at gcc dot gnu.org
2024-04-12 13:36 ` law at gcc dot gnu.org
2024-04-12 15:55 ` jakub at gcc dot gnu.org
2024-04-12 16:57 ` uecker at gcc dot gnu.org
2024-04-12 17:07 ` jakub at gcc dot gnu.org
2024-04-12 21:06 ` uecker at gcc dot gnu.org
2024-04-18 11:57 ` jakub at gcc dot gnu.org
2024-04-18 13:18 ` muecker at gwdg dot de
2024-04-19  8:20 ` jakub at gcc dot gnu.org [this message]
2024-04-19  8:30 ` jakub at gcc dot gnu.org
2024-04-19  8:35 ` pinskia at gcc dot gnu.org
2024-04-19 22:11 ` cvs-commit at gcc dot gnu.org
2024-04-19 22:25 ` jakub 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-114574-4-VzEjmwN5UC@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).