public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug tree-optimization/110434] New: tree-nrv introduces incorrect CLOBBER(eol)
@ 2023-06-27 10:48 kristerw at gcc dot gnu.org
  2023-06-28  9:32 ` [Bug tree-optimization/110434] " rguenth at gcc dot gnu.org
                   ` (2 more replies)
  0 siblings, 3 replies; 4+ messages in thread
From: kristerw at gcc dot gnu.org @ 2023-06-27 10:48 UTC (permalink / raw)
  To: gcc-bugs

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

            Bug ID: 110434
           Summary: tree-nrv introduces incorrect CLOBBER(eol)
           Product: gcc
           Version: 14.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: tree-optimization
          Assignee: unassigned at gcc dot gnu.org
          Reporter: kristerw at gcc dot gnu.org
  Target Milestone: ---

The tree-nrv pass may introduce incorrect CLOBBER(eol) of the form
  <retval> ={v} {CLOBBER(eol)};
  return <retval>;

One example of this can be seen by compiling gcc.c-torture/execute/921204-1.c
for x86 using the flags "-O -m32", where it changes the IR

  union bu o;
  ...
  o = i;
  MEM[(union  *)&o].b18 = _11;
  MEM[(union  *)&o].b20 = _11;
  <retval> = o;
  o ={v} {CLOBBER(eol)};
  return <retval>;

to just use <retval> instead of o

  union bu o [value-expr: <retval>];
  ...
  <retval> = i;
  MEM[(union  *)&<retval>].b18 = _11;
  MEM[(union  *)&<retval>].b20 = _11;
  <retval> ={v} {CLOBBER(eol)};
  return <retval>;

so the CLOBBER(eol) now refers to <retval>.

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2023-06-28 13:56 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-06-27 10:48 [Bug tree-optimization/110434] New: tree-nrv introduces incorrect CLOBBER(eol) kristerw at gcc dot gnu.org
2023-06-28  9:32 ` [Bug tree-optimization/110434] " rguenth at gcc dot gnu.org
2023-06-28 13:55 ` cvs-commit at gcc dot gnu.org
2023-06-28 13:56 ` rguenth at gcc dot gnu.org

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).