[Bug c++/105912] internal compiler error: in extract_call_expr, at cp/call.cc:7114
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=105912 Patrick Palka changed: What|Removed |Added Resolution|--- |FIXED Status|ASSIGNED|RESOLVED --- Comment #7 from Patrick Palka --- Fixed for GCC 12.2/13
[Bug c++/105912] internal compiler error: in extract_call_expr, at cp/call.cc:7114
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=105912 --- Comment #6 from CVS Commits --- The releases/gcc-12 branch has been updated by Patrick Palka : https://gcc.gnu.org/g:a074ae297d5dbd69e03c6c30f9cb7720685fdb62 commit r12-8606-ga074ae297d5dbd69e03c6c30f9cb7720685fdb62 Author: Patrick Palka Date: Thu Jul 21 12:59:44 2022 -0400 c++: non-dependent call to consteval operator [PR105912] Here we're crashing when substituting a non-dependent call to a consteval operator, whose CALL_EXPR_OPERATOR_SYNTAX flag we try to propagate to the result, but the result isn't a CALL_EXPR since the selected function is consteval. This patch fixes this by checking the result of extract_call_expr accordingly. (Note that we can't check DECL_IMMEDIATE_FUNCTION_P here because we don't know which function was selected by overload resolution from here.) PR c++/105912 gcc/cp/ChangeLog: * call.cc (extract_call_expr): Return a NULL_TREE on failure instead of asserting. * pt.cc (tsubst_copy_and_build) : Guard against NULL_TREE extract_call_expr result. gcc/testsuite/ChangeLog: * g++.dg/cpp2a/consteval31.C: New test. (cherry picked from commit f70c18524221dcefa6cd26cee7b55503181bd912)
[Bug c++/105912] internal compiler error: in extract_call_expr, at cp/call.cc:7114
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=105912 Patrick Palka changed: What|Removed |Added Target Milestone|--- |12.2
[Bug c++/105912] internal compiler error: in extract_call_expr, at cp/call.cc:7114
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=105912 --- Comment #5 from CVS Commits --- The master branch has been updated by Patrick Palka : https://gcc.gnu.org/g:f70c18524221dcefa6cd26cee7b55503181bd912 commit r13-1688-gf70c18524221dcefa6cd26cee7b55503181bd912 Author: Patrick Palka Date: Wed Jul 13 14:02:08 2022 -0400 c++: non-dependent call to consteval operator [PR105912] Here we're crashing when substituting a non-dependent call to a consteval operator, whose CALL_EXPR_OPERATOR_SYNTAX flag we try to propagate to the result, but the result isn't a CALL_EXPR since the selected function is consteval. This patch fixes this by checking the result of extract_call_expr accordingly. (Note that we can't check DECL_IMMEDIATE_FUNCTION_P here because we don't know which function was selected by overload resolution from here.) PR c++/105912 gcc/cp/ChangeLog: * pt.cc (tsubst_copy_and_build) : Guard against NULL_TREE extract_call_expr result. gcc/testsuite/ChangeLog: * g++.dg/cpp2a/consteval31.C: New test.
[Bug c++/105912] internal compiler error: in extract_call_expr, at cp/call.cc:7114
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=105912 Patrick Palka changed: What|Removed |Added CC||ppalka at gcc dot gnu.org Status|NEW |ASSIGNED Assignee|unassigned at gcc dot gnu.org |ppalka at gcc dot gnu.org
[Bug c++/105912] internal compiler error: in extract_call_expr, at cp/call.cc:7114
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=105912 Martin Liška changed: What|Removed |Added CC||jakub at gcc dot gnu.org, ||marxin at gcc dot gnu.org --- Comment #4 from Martin Liška --- (In reply to Marek Polacek from comment #3) > The ICE started with r277733 > > commit f968ef9b8df2bc2287e5e7e87299e5a2a44e8c94 > Author: Jakub Jelinek > Date: Sat Nov 2 00:28:20 2019 +0100 > > PR c++/88335 - Implement P1073R3: Immediate functions @Marek: Please add to CC author of a revision you bisected to.
[Bug c++/105912] internal compiler error: in extract_call_expr, at cp/call.cc:7114
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=105912 --- Comment #3 from Marek Polacek --- The ICE started with r277733 commit f968ef9b8df2bc2287e5e7e87299e5a2a44e8c94 Author: Jakub Jelinek Date: Sat Nov 2 00:28:20 2019 +0100 PR c++/88335 - Implement P1073R3: Immediate functions
[Bug c++/105912] internal compiler error: in extract_call_expr, at cp/call.cc:7114
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=105912 Marek Polacek changed: What|Removed |Added Ever confirmed|0 |1 Keywords||ice-on-invalid-code CC||mpolacek at gcc dot gnu.org Last reconfirmed||2022-06-09 Status|UNCONFIRMED |NEW --- Comment #2 from Marek Polacek --- Thanks for the reduction, confirmed.
[Bug c++/105912] internal compiler error: in extract_call_expr, at cp/call.cc:7114
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=105912 --- Comment #1 from Luke Dalessandro --- Somewhat reduced testcase: template struct A {}; template struct B {}; template static consteval auto operator~(A) -> B { return {}; } A<'i'> i; template auto test() -> bool { auto ii = ~i; // ICE HERE return true; } int main() { bool i = test(); } https://godbolt.org/z/rEf4neexc