public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
From: "pinskia at gcc dot gnu.org" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug ipa/103766] [12 Regression] Initialization of variable passed via static chain is lost.
Date: Sun, 19 Dec 2021 07:43:03 +0000	[thread overview]
Message-ID: <bug-103766-4-fp9ERz2GUn@http.gcc.gnu.org/bugzilla/> (raw)
In-Reply-To: <bug-103766-4@http.gcc.gnu.org/bugzilla/>

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

--- Comment #2 from Andrew Pinski <pinskia at gcc dot gnu.org> ---
I tried to reproduce it with the following GNU C code but it still
worked:struct __st_parameter_dt
{
  const char *filename ;
  int linenum;
  int flags;
  int unit;
};
[[gnu::noinline, gnu::access(read_only, 1), gnu::access(read_only, 2, 3),
gnu::noclone, gnu::leaf]]
void print(struct __st_parameter_dt *b, void *a, int);
[[gnu::noinline, gnu::access(read_only, 1), gnu::noclone, gnu::leaf]]
void print1(struct __st_parameter_dt *b);
[[gnu::noinline, gnu::access(read_only, 1), gnu::noclone, gnu::leaf]]
void print2(struct __st_parameter_dt *b);

int main(void)
{
  double a;
  a = 1;
  [[gnu::noinline]]
  void f()
  {
      struct __st_parameter_dt b;
      b.filename = "a.c";
      b.linenum = 20;
      b.flags =128;
      b.unit = 1;
      print1(&b);
      print(&b, &a, sizeof(a));
      print2(&b);
  }
  f();
}

  parent reply	other threads:[~2021-12-19  7:43 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-12-18 23:31 [Bug fortran/103766] New: " iains at gcc dot gnu.org
2021-12-18 23:33 ` [Bug fortran/103766] " iains at gcc dot gnu.org
2021-12-18 23:36 ` iains at gcc dot gnu.org
2021-12-19  7:43 ` pinskia at gcc dot gnu.org [this message]
2021-12-19  7:51 ` [Bug ipa/103766] " pinskia at gcc dot gnu.org
2021-12-19 16:03 ` kargl at gcc dot gnu.org
2021-12-19 16:57 ` hubicka at gcc dot gnu.org
2021-12-19 20:52 ` hubicka at gcc dot gnu.org
2021-12-19 21:33 ` iains at gcc dot gnu.org
2021-12-19 21:39 ` hubicka at kam dot mff.cuni.cz
2021-12-19 21:40 ` cvs-commit at gcc dot gnu.org
2021-12-19 21:42 ` hubicka at gcc dot gnu.org
2021-12-19 21:58 ` pinskia at gcc dot gnu.org
2021-12-19 22:11 ` hubicka at kam dot mff.cuni.cz
2021-12-21 19:10 ` fxcoudert 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-103766-4-fp9ERz2GUn@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).