[Bug tree-optimization/109804] [11/12/13/14 Regression] internal compiler error in gimple-ssa-warn-access.cc
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=109804 --- Comment #12 from GCC Commits --- The trunk branch has been updated by Andrew Pinski : https://gcc.gnu.org/g:1076ffda6ce5e6d5fc9577deaf8233e549e5787a commit r14-9138-g1076ffda6ce5e6d5fc9577deaf8233e549e5787a Author: Andrew Pinski Date: Wed Feb 21 20:12:21 2024 -0800 warn-access: Fix handling of unnamed types [PR109804] This looks like an oversight of handling DEMANGLE_COMPONENT_UNNAMED_TYPE. DEMANGLE_COMPONENT_UNNAMED_TYPE only has the u.s_number.number set while the code expected newc.u.s_binary.left would be valid. So this treats DEMANGLE_COMPONENT_UNNAMED_TYPE like we treat function paramaters (DEMANGLE_COMPONENT_FUNCTION_PARAM) and template paramaters (DEMANGLE_COMPONENT_TEMPLATE_PARAM). Note the code in the demangler does this when it sets DEMANGLE_COMPONENT_UNNAMED_TYPE: ret->type = DEMANGLE_COMPONENT_UNNAMED_TYPE; ret->u.s_number.number = num; Committed as obvious after bootstrap/test on x86_64-linux-gnu PR tree-optimization/109804 gcc/ChangeLog: * gimple-ssa-warn-access.cc (new_delete_mismatch_p): Handle DEMANGLE_COMPONENT_UNNAMED_TYPE. gcc/testsuite/ChangeLog: * g++.dg/warn/Wmismatched-new-delete-8.C: New test. Signed-off-by: Andrew Pinski
[Bug tree-optimization/109804] [11/12/13/14 Regression] internal compiler error in gimple-ssa-warn-access.cc
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=109804 Andrew Pinski changed: What|Removed |Added Status|NEW |ASSIGNED Assignee|unassigned at gcc dot gnu.org |pinskia at gcc dot gnu.org --- Comment #11 from Andrew Pinski --- (In reply to Marek Polacek from comment #9) > Right. Local unnamed enums are of the DEMANGLE_COMPONENT_UNNAMED_TYPE type, > but those don't have their subtrees filed as per > cplus_demangle_fill_component. So I think we can't do *newc.u.s_binary.left > when the type is DEMANGLE_COMPONENT_UNNAMED_TYPE. Maybe they need a new > case in new_delete_mismatch_p. ret->type = DEMANGLE_COMPONENT_UNNAMED_TYPE; ret->u.s_number.number = num; Yes and we just need to compare the number. Let me add that and test it.
[Bug tree-optimization/109804] [11/12/13/14 Regression] internal compiler error in gimple-ssa-warn-access.cc
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=109804 Jakub Jelinek changed: What|Removed |Added Target Milestone|11.4|11.5 --- Comment #10 from Jakub Jelinek --- GCC 11.4 is being released, retargeting bugs to GCC 11.5.
[Bug tree-optimization/109804] [11/12/13/14 Regression] internal compiler error in gimple-ssa-warn-access.cc
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=109804 Richard Biener changed: What|Removed |Added Priority|P3 |P2
[Bug tree-optimization/109804] [11/12/13/14 Regression] internal compiler error in gimple-ssa-warn-access.cc
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=109804 --- Comment #9 from Marek Polacek --- Right. Local unnamed enums are of the DEMANGLE_COMPONENT_UNNAMED_TYPE type, but those don't have their subtrees filed as per cplus_demangle_fill_component. So I think we can't do *newc.u.s_binary.left when the type is DEMANGLE_COMPONENT_UNNAMED_TYPE. Maybe they need a new case in new_delete_mismatch_p.
[Bug tree-optimization/109804] [11/12/13/14 Regression] internal compiler error in gimple-ssa-warn-access.cc
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=109804 --- Comment #8 from Andrew Pinski --- (In reply to Andrew Pinski from comment #7) > I am suspecting the `unnamed enum` is causing the ICE. I mean the local unnamed enums is what is exposing the ICE. Naming either of them and the ICE goes away.
[Bug tree-optimization/109804] [11/12/13/14 Regression] internal compiler error in gimple-ssa-warn-access.cc
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=109804 --- Comment #7 from Andrew Pinski --- I am suspecting the `unnamed enum` is causing the ICE.
[Bug tree-optimization/109804] [11/12/13/14 Regression] internal compiler error in gimple-ssa-warn-access.cc
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=109804 --- Comment #6 from Andrew Pinski --- Note the ICE moved from maybe_emit_free_warning in expand.c in GCC 11 to new_delete_mismatch_p in gimple-ssa-warn-access.cc in GCC 12+.
[Bug tree-optimization/109804] [11/12/13/14 Regression] internal compiler error in gimple-ssa-warn-access.cc
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=109804 --- Comment #3 from Marek Polacek --- Started with r11-6507 commit fd64f348a6b40621dc2bcc743f5fdfb31ed0894c Author: Martin Sebor Date: Wed Jan 6 13:36:18 2021 -0700 PR c++/98305 spurious -Wmismatched-new-delete on template instance
[Bug tree-optimization/109804] [11/12/13/14 Regression] internal compiler error in gimple-ssa-warn-access.cc
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=109804 Marek Polacek changed: What|Removed |Added Status|UNCONFIRMED |NEW Target Milestone|--- |11.4 CC||mpolacek at gcc dot gnu.org Last reconfirmed||2023-05-10 Summary|internal compiler error in |[11/12/13/14 Regression] |gimple-ssa-warn-access.cc |internal compiler error in ||gimple-ssa-warn-access.cc Ever confirmed|0 |1 --- Comment #2 from Marek Polacek --- Confirmed.