[Bug tree-optimization/114776] -Wuse-after-free analysis believes assert() but not g_assert_null()

2024-04-18 Thread alan.coopersmith at oracle dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=114776 --- Comment #6 from Alan Coopersmith --- Thanks, I didn't realize there was a test_nonfatal_assertions path through the g_assert that could return here. I'll update the wording on my proposed workaround to reflect that:

[Bug tree-optimization/114776] -Wuse-after-free analysis believes assert() but not g_assert_null()

2024-04-18 Thread alan.coopersmith at oracle dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=114776 --- Comment #5 from Alan Coopersmith --- Created attachment 57986 --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=57986=edit Preproccessed test case

[Bug tree-optimization/114776] -Wuse-after-free analysis believes assert() but not g_assert_null()

2024-04-18 Thread pinskia at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=114776 Andrew Pinski changed: What|Removed |Added Status|WAITING |RESOLVED Resolution|---

[Bug tree-optimization/114776] -Wuse-after-free analysis believes assert() but not g_assert_null()

2024-04-18 Thread pinskia at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=114776 --- Comment #3 from Andrew Pinski --- Seems like g_assertion_message should have _Noreturn on it if you are compiling for C11-C17 and [[noreturn]] for C++11+ (and C23+).

[Bug tree-optimization/114776] -Wuse-after-free analysis believes assert() but not g_assert_null()

2024-04-18 Thread pinskia at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=114776 --- Comment #2 from Andrew Pinski --- As far as I can tell g_assertion_message does not have noreturn on it which means this invalid. It only has G_ANALYZER_NORETURN on it. which is only defined to analyzer_noreturn if running under clang's

[Bug tree-optimization/114776] -Wuse-after-free analysis believes assert() but not g_assert_null()

2024-04-18 Thread pinskia at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=114776 Andrew Pinski changed: What|Removed |Added Status|UNCONFIRMED |WAITING Last reconfirmed|