public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug d/101691] New: d: Use of LOOP_EXPR prevents removing no-op loops.
@ 2021-07-30 10:35 ibuclaw at gdcproject dot org
  2021-07-30 20:47 ` [Bug d/101691] " pinskia at gcc dot gnu.org
                   ` (2 more replies)
  0 siblings, 3 replies; 4+ messages in thread
From: ibuclaw at gdcproject dot org @ 2021-07-30 10:35 UTC (permalink / raw)
  To: gcc-bugs

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

            Bug ID: 101691
           Summary: d: Use of LOOP_EXPR prevents removing no-op loops.
           Product: gcc
           Version: 12.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: d
          Assignee: ibuclaw at gdcproject dot org
          Reporter: ibuclaw at gdcproject dot org
  Target Milestone: ---

As observed on compiler explorer.

https://d.godbolt.org/z/eM8Pv91eT

The C, C++ (and Fortran?) front-ends lower loops as labels and gotos, which
*is* optimized away.

https://godbolt.org/z/8Yz9oqx63

---
void fun(int a, int b, int step) 
{
    for (int i = a; i < b; i += step) {
    }
}

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

end of thread, other threads:[~2022-07-08  8:54 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-07-30 10:35 [Bug d/101691] New: d: Use of LOOP_EXPR prevents removing no-op loops ibuclaw at gdcproject dot org
2021-07-30 20:47 ` [Bug d/101691] " pinskia at gcc dot gnu.org
2021-07-30 20:49 ` pinskia at gcc dot gnu.org
2022-07-08  8:54 ` ibuclaw at gdcproject dot 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).