public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug tree-optimization/101291] New: turns infinite loop into finite
@ 2021-07-02  7:54 guojiufu at gcc dot gnu.org
  2021-07-02  8:07 ` [Bug tree-optimization/101291] " linkw at gcc dot gnu.org
                   ` (13 more replies)
  0 siblings, 14 replies; 15+ messages in thread
From: guojiufu at gcc dot gnu.org @ 2021-07-02  7:54 UTC (permalink / raw)
  To: gcc-bugs

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

            Bug ID: 101291
           Summary: turns infinite loop into finite
           Product: gcc
           Version: 11.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: tree-optimization
          Assignee: unassigned at gcc dot gnu.org
          Reporter: guojiufu at gcc dot gnu.org
  Target Milestone: ---

For the below code, it should run infinite, but it terminates quickly.

#include <limits.h>
__attribute__ ((noinline))
unsigned foo(unsigned val, unsigned start)
{
  unsigned cnt = 0;
  for (unsigned i = start; i <= val; i+=16)
    cnt++;
  return cnt;
}

int main()
{
  return foo (UINT_MAX-7, 8);
}

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

end of thread, other threads:[~2021-09-06 10:19 UTC | newest]

Thread overview: 15+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-07-02  7:54 [Bug tree-optimization/101291] New: turns infinite loop into finite guojiufu at gcc dot gnu.org
2021-07-02  8:07 ` [Bug tree-optimization/101291] " linkw at gcc dot gnu.org
2021-07-02  8:22 ` linkw at gcc dot gnu.org
2021-07-02  8:26 ` rguenth at gcc dot gnu.org
2021-07-02  8:28 ` rguenth at gcc dot gnu.org
2021-07-02  8:29 ` marxin at gcc dot gnu.org
2021-07-02  8:41 ` rguenth at gcc dot gnu.org
2021-07-02  9:00 ` guojiufu at gcc dot gnu.org
2021-07-02  9:18 ` rguenth at gcc dot gnu.org
2021-07-05 10:05 ` [Bug tree-optimization/101291] [10/11/12 Regression] " rguenth at gcc dot gnu.org
2021-07-05 10:52 ` cvs-commit at gcc dot gnu.org
2021-07-05 10:52 ` [Bug tree-optimization/101291] [10/11 " rguenth at gcc dot gnu.org
2021-07-13 10:59 ` cvs-commit at gcc dot gnu.org
2021-09-06 10:18 ` [Bug tree-optimization/101291] [10 " cvs-commit at gcc dot gnu.org
2021-09-06 10:19 ` 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).