public inbox for gcc-bugs@sourceware.org help / color / mirror / Atom feed
* [Bug c++/109686] New: Errorneous infinite loop detection (-Winfinite-recursion) @ 2023-05-01 13:57 madhur4127 at gmail dot com 2023-05-01 15:47 ` [Bug middle-end/109686] " arsen at gcc dot gnu.org ` (2 more replies) 0 siblings, 3 replies; 4+ messages in thread From: madhur4127 at gmail dot com @ 2023-05-01 13:57 UTC (permalink / raw) To: gcc-bugs https://gcc.gnu.org/bugzilla/show_bug.cgi?id=109686 Bug ID: 109686 Summary: Errorneous infinite loop detection (-Winfinite-recursion) Product: gcc Version: 14.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: c++ Assignee: unassigned at gcc dot gnu.org Reporter: madhur4127 at gmail dot com Target Milestone: --- This code: ``` #define myassert(x) \ do { \ if (! (x) ) \ abort(); \ } while (false) static void recursive(int n) { myassert(n > 0); recursive(n - 1); printf("%d\n", n); } ``` should not result in infinite recursion. Assert fails for all non-positive integers. For positive numbers it counts down to 0 and then fails. This affect GCC12, GCC13 and trunk: https://compiler-explorer.com/z/57qrnzdEK ^ permalink raw reply [flat|nested] 4+ messages in thread
* [Bug middle-end/109686] Errorneous infinite loop detection (-Winfinite-recursion) 2023-05-01 13:57 [Bug c++/109686] New: Errorneous infinite loop detection (-Winfinite-recursion) madhur4127 at gmail dot com @ 2023-05-01 15:47 ` arsen at gcc dot gnu.org 2023-05-01 16:04 ` madhur4127 at gmail dot com 2023-05-01 16:08 ` arsen at gcc dot gnu.org 2 siblings, 0 replies; 4+ messages in thread From: arsen at gcc dot gnu.org @ 2023-05-01 15:47 UTC (permalink / raw) To: gcc-bugs https://gcc.gnu.org/bugzilla/show_bug.cgi?id=109686 Arsen Arsenović <arsen at gcc dot gnu.org> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |arsen at gcc dot gnu.org --- Comment #1 from Arsen Arsenović <arsen at gcc dot gnu.org> --- possibly dupe of https://gcc.gnu.org/bugzilla/show_bug.cgi?id=107334 ? ^ permalink raw reply [flat|nested] 4+ messages in thread
* [Bug middle-end/109686] Errorneous infinite loop detection (-Winfinite-recursion) 2023-05-01 13:57 [Bug c++/109686] New: Errorneous infinite loop detection (-Winfinite-recursion) madhur4127 at gmail dot com 2023-05-01 15:47 ` [Bug middle-end/109686] " arsen at gcc dot gnu.org @ 2023-05-01 16:04 ` madhur4127 at gmail dot com 2023-05-01 16:08 ` arsen at gcc dot gnu.org 2 siblings, 0 replies; 4+ messages in thread From: madhur4127 at gmail dot com @ 2023-05-01 16:04 UTC (permalink / raw) To: gcc-bugs https://gcc.gnu.org/bugzilla/show_bug.cgi?id=109686 Madhur Chauhan <madhur4127 at gmail dot com> changed: What |Removed |Added ---------------------------------------------------------------------------- Resolution|--- |DUPLICATE Status|UNCONFIRMED |RESOLVED --- Comment #2 from Madhur Chauhan <madhur4127 at gmail dot com> --- Yes it's a dupe. Sorry. *** This bug has been marked as a duplicate of bug 107334 *** ^ permalink raw reply [flat|nested] 4+ messages in thread
* [Bug middle-end/109686] Errorneous infinite loop detection (-Winfinite-recursion) 2023-05-01 13:57 [Bug c++/109686] New: Errorneous infinite loop detection (-Winfinite-recursion) madhur4127 at gmail dot com 2023-05-01 15:47 ` [Bug middle-end/109686] " arsen at gcc dot gnu.org 2023-05-01 16:04 ` madhur4127 at gmail dot com @ 2023-05-01 16:08 ` arsen at gcc dot gnu.org 2 siblings, 0 replies; 4+ messages in thread From: arsen at gcc dot gnu.org @ 2023-05-01 16:08 UTC (permalink / raw) To: gcc-bugs https://gcc.gnu.org/bugzilla/show_bug.cgi?id=109686 --- Comment #3 from Arsen Arsenović <arsen at gcc dot gnu.org> --- no problem, thank you for reporting ^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2023-05-01 16:08 UTC | newest] Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed) -- links below jump to the message on this page -- 2023-05-01 13:57 [Bug c++/109686] New: Errorneous infinite loop detection (-Winfinite-recursion) madhur4127 at gmail dot com 2023-05-01 15:47 ` [Bug middle-end/109686] " arsen at gcc dot gnu.org 2023-05-01 16:04 ` madhur4127 at gmail dot com 2023-05-01 16:08 ` arsen 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).