public inbox for gcc-bugs@sourceware.org help / color / mirror / Atom feed
From: "pinskia at gcc dot gnu.org" <gcc-bugzilla@gcc.gnu.org> To: gcc-bugs@gcc.gnu.org Subject: [Bug ipa/103830] [12 Regression] null pointer access optimized away by removing function call at -Og Date: Sun, 26 Dec 2021 10:19:51 +0000 [thread overview] Message-ID: <bug-103830-4-KZNNBjvQwJ@http.gcc.gnu.org/bugzilla/> (raw) In-Reply-To: <bug-103830-4@http.gcc.gnu.org/bugzilla/> https://gcc.gnu.org/bugzilla/show_bug.cgi?id=103830 Andrew Pinski <pinskia at gcc dot gnu.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Component|rtl-optimization |ipa Last reconfirmed| |2021-12-26 Target Milestone|--- |12.0 Summary|volatile optimized away |[12 Regression] null | |pointer access optimized | |away by removing function | |call at -Og Status|UNCONFIRMED |NEW CC| |hubicka at gcc dot gnu.org, | |marxin at gcc dot gnu.org, | |pinskia at gcc dot gnu.org Ever confirmed|0 |1 --- Comment #2 from Andrew Pinski <pinskia at gcc dot gnu.org> --- What was removed is not the null pointer itself but rather the function calls to both MyClass::call and intermediate. cddce: Eliminating unnecessary statements: Deleting : MyClass::call (_4); Eliminating unnecessary statements: Deleting : intermediate (D.2427); >From local-const-pure: local analysis of void MyClass::call()/1 NULL memory access; terminating BB checking previously known: void MyClass::call()/1 is not a malloc candidate, reason: No return value. Function is locally const. .... The question is do we want to do const-pure at -Og really. >it is IMHO invalid to optimize it away (at -Og): No, it is valid to remove as it is undefined behavior, the question comes do we want to do the removal at -Og; I suspect no.
next prev parent reply other threads:[~2021-12-26 10:19 UTC|newest] Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top 2021-12-26 10:00 [Bug rtl-optimization/103830] New: volatile optimized away bernd.edlinger at hotmail dot de 2021-12-26 10:10 ` [Bug rtl-optimization/103830] " pinskia at gcc dot gnu.org 2021-12-26 10:19 ` pinskia at gcc dot gnu.org [this message] 2021-12-27 16:20 ` [Bug ipa/103830] [12 Regression] null pointer access optimized away by removing function call at -Og jakub at gcc dot gnu.org 2022-01-04 13:35 ` rguenth at gcc dot gnu.org 2022-01-04 14:52 ` hubicka at kam dot mff.cuni.cz 2022-01-28 12:02 ` rguenth at gcc dot gnu.org 2022-01-28 12:04 ` rguenth at gcc dot gnu.org 2022-01-28 12:06 ` rguenth at gcc dot gnu.org 2022-01-28 12:08 ` bernd.edlinger at hotmail dot de
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-103830-4-KZNNBjvQwJ@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).