public inbox for gcc-bugs@sourceware.org help / color / mirror / Atom feed
From: "jakub at gcc dot gnu.org" <gcc-bugzilla@gcc.gnu.org> To: gcc-bugs@gcc.gnu.org Subject: [Bug tree-optimization/114872] [13/14/15 Regression] Miscompilation with -O2 after commit r13-8037 Date: Mon, 29 Apr 2024 16:00:25 +0000 [thread overview] Message-ID: <bug-114872-4-jiHWKczXCp@http.gcc.gnu.org/bugzilla/> (raw) In-Reply-To: <bug-114872-4@http.gcc.gnu.org/bugzilla/> https://gcc.gnu.org/bugzilla/show_bug.cgi?id=114872 --- Comment #6 from Jakub Jelinek <jakub at gcc dot gnu.org> --- I have looked at the IL and I don't see how it could crash that way based on the -fdump-tree-optimized-lineno dump, neither on branch nor on the trunk. On the branch, I see <bb 286> [local count: 462566023]: [element.c:26539:57 discrim 1] __pyx_t_5_522(ab) = 0B; [/usr/include/python3.12/object.h:797:8] if (__pyx_t_6_211(ab) != 0B) goto <bb 291>; [70.00%] else goto <bb 290>; [30.00%] <bb 290> [local count: 462566023]: [element.c:26540:57 discrim 1] __pyx_t_6_524(ab) = 0B; [/usr/include/python3.12/object.h:797:8] if (__pyx_t_8_1031(ab) != 0B) goto <bb 295>; [70.00%] else goto <bb 294>; [30.00%] <bb 291> [local count: 323796219]: [/usr/include/python3.12/object.h:242:25] _1105 = [/usr/include/python3.12/object.h:242:25] [/usr/include/python3.12/object.h:242:25] __pyx_t_6_211(ab)->D.10046.ob_refcnt; [/usr/include/python3.12/object.h:242:13] _1106 = (int) _1105; [/usr/include/python3.12/object.h:700:8 discrim 1] if (_1106 < 0) goto <bb 290>; [26.36%] else goto <bb 292>; [73.64%] <bb 292> [local count: 238443538]: [/usr/include/python3.12/object.h:704:9] _1107 = _1105 + -1; [/usr/include/python3.12/object.h:704:8] [/usr/include/python3.12/object.h:704:13] [/usr/include/python3.12/object.h:704:13] __pyx_t_6_211(ab)->D.10046.ob_refcnt = _1107; [/usr/include/python3.12/object.h:704:8] if (_1107 == 0) goto <bb 293>; [33.00%] else goto <bb 290>; [67.00%] <bb 293> [local count: 78686364]: [/usr/include/python3.12/object.h:705:9] _Py_Dealloc (__pyx_t_6_211(ab)); goto <bb 290>; [100.00%] so the 26540 line case checks if the pointer later passed to the _Py_Dealloc is non-NULL and doesn't let it be called in that case.
next prev parent reply other threads:[~2024-04-29 16:00 UTC|newest] Thread overview: 30+ messages / expand[flat|nested] mbox.gz Atom feed top 2024-04-27 18:57 [Bug c/114872] New: Miscompilation with -O2 after commit 049ec9b981d1f4f97736061d5cf7d0ae990b57d7 arojas at archlinux dot org 2024-04-27 18:59 ` [Bug c/114872] " arojas at archlinux dot org 2024-04-27 19:03 ` pinskia at gcc dot gnu.org 2024-04-27 19:05 ` pinskia at gcc dot gnu.org 2024-04-27 19:06 ` arojas at archlinux dot org 2024-04-27 20:00 ` [Bug tree-optimization/114872] [13/14/15 Regression] Miscompilation with -O2 after commit r13-8037 pinskia at gcc dot gnu.org 2024-04-29 15:53 ` sjames at gcc dot gnu.org 2024-04-29 16:00 ` jakub at gcc dot gnu.org [this message] 2024-04-29 20:05 ` arojas at archlinux dot org 2024-05-01 1:00 ` sjames at gcc dot gnu.org 2024-05-01 1:01 ` sjames at gcc dot gnu.org 2024-05-01 1:01 ` sjames at gcc dot gnu.org 2024-05-01 1:03 ` sjames at gcc dot gnu.org 2024-05-03 11:07 ` dima.pasechnik at cs dot ox.ac.uk 2024-05-03 11:26 ` dima.pasechnik at cs dot ox.ac.uk 2024-05-06 13:53 ` slyfox at gcc dot gnu.org 2024-05-06 17:29 ` jakub at gcc dot gnu.org 2024-05-06 17:59 ` jakub at gcc dot gnu.org 2024-05-06 21:41 ` slyfox at gcc dot gnu.org 2024-05-06 22:08 ` slyfox at gcc dot gnu.org 2024-05-06 22:45 ` dima.pasechnik at cs dot ox.ac.uk 2024-05-07 10:45 ` jakub at gcc dot gnu.org 2024-05-07 11:05 ` slyfox at gcc dot gnu.org 2024-05-07 22:13 ` slyfox at gcc dot gnu.org 2024-05-08 8:18 ` slyfox at gcc dot gnu.org 2024-05-08 8:27 ` rguenth at gcc dot gnu.org 2024-05-08 18:10 ` slyfox at gcc dot gnu.org 2024-05-08 19:17 ` dima.pasechnik at cs dot ox.ac.uk 2024-05-08 19:35 ` pinskia at gcc dot gnu.org 2024-05-08 19:58 ` jakub 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-114872-4-jiHWKczXCp@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: linkBe 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).