On 7/28/21 8:51 AM, Aldy Hernandez via Gcc-patches wrote:
On 7/28/21 4:32 PM, Jeff Law wrote:
...
diff --git a/gcc/Makefile.in b/gcc/Makefile.in
index 863f1256811..0e205a41ac3 100644
--- a/gcc/Makefile.in
+++ b/gcc/Makefile.in
@@ -223,6 +223,11 @@ gimple-match.o-warn = -Wno-unused
generic-match.o-warn = -Wno-unused
dfp.o-warn = -Wno-strict-aliasing
+# maybe_emit_free_warning() is picking up the inlined location for the
+# warning, not the source of the original va_heap::release() function
+# which has a pragma disabling this warning.
+tree-ssa-loop-im.o-warn = -Wno-free-nonheap-object
I think some of Martin's work may help here, but I'm not sure if it's
all gone in yet. It might be worth syncing with him on the state of
the improvements to how inlining and warnings interact. If his work
does fix the problem here, this hunk can be removed as a distinct
follow-up.
Yes. He definitely has some patches in this space that were likely to
fix this. I will re-test without this hunk, and remove it if it's fixed.
I think I tested your patch on top of mine while it was still in
review and confirmed that the workaround isn't necessary anymore.
But if something's changed/regressed since then please let me know.
Martin