[Bug c++/96533] ICE with three-way comparison when error occurs in templated operator< overload and -Wunused-parameter

2023-07-13 Thread ppalka at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=96533

Patrick Palka  changed:

   What|Removed |Added

 Status|NEW |RESOLVED
   Target Milestone|--- |12.0
 Resolution|--- |FIXED

--- Comment #11 from Patrick Palka  ---
Thus fixed.  Adding a testcase for this issue doesn't seem super worthwhile.

[Bug c++/96533] ICE with three-way comparison when error occurs in templated operator< overload and -Wunused-parameter

2023-07-13 Thread ppalka at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=96533

Patrick Palka  changed:

   What|Removed |Added

  Known to work||12.1.0, 13.1.0
  Known to fail||10.5.0, 11.4.0
 CC||ppalka at gcc dot gnu.org

--- Comment #10 from Patrick Palka  ---
This seems fixed for GCC 12+ by r12-6022-gbb2a7f80a98de3.

[Bug c++/96533] ICE with three-way comparison when error occurs in templated operator< overload and -Wunused-parameter

2021-12-16 Thread mpolacek at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=96533

Marek Polacek  changed:

   What|Removed |Added

   Last reconfirmed||2021-12-16
 Status|UNCONFIRMED |NEW
 Ever confirmed|0   |1
 CC||mpolacek at gcc dot gnu.org

--- Comment #9 from Marek Polacek  ---
Confirmed.  do_warn_unused_parameter ends up calling itself, oops.

[Bug c++/96533] ICE with three-way comparison when error occurs in templated operator< overload and -Wunused-parameter

2021-12-16 Thread pinskia at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=96533

--- Comment #8 from Andrew Pinski  ---
0xccadfb do_warn_unused_parameter(tree_node*)
/home/apinski/src/upstream-gcc/gcc/gcc/c-family/c-warn.c:2414
0xa74de1 finish_function(bool)
/home/apinski/src/upstream-gcc/gcc/gcc/cp/decl.c:17816
0xba9b36 instantiate_body
/home/apinski/src/upstream-gcc/gcc/gcc/cp/pt.c:26176
0xbaad6a instantiate_decl(tree_node*, bool, bool)
/home/apinski/src/upstream-gcc/gcc/gcc/cp/pt.c:26450
0xa8586a maybe_instantiate_decl(tree_node*)
/home/apinski/src/upstream-gcc/gcc/gcc/cp/decl2.c:5594
0xa86aac maybe_instantiate_decl(tree_node*)
/home/apinski/src/upstream-gcc/gcc/gcc/cp/decl2.c:5830
0xa86aac mark_used(tree_node*, int)
/home/apinski/src/upstream-gcc/gcc/gcc/cp/decl2.c:5856
0x9ce2ce build_over_call
/home/apinski/src/upstream-gcc/gcc/gcc/cp/call.c:9819
0x9d4f59 build_new_op(op_location_t const&, tree_code, int, tree_node*,
tree_node*, tree_node*, tree_node**, int)
/home/apinski/src/upstream-gcc/gcc/gcc/cp/call.c:6685
0x9d5296 build_new_op(op_location_t const&, tree_code, int, tree_node*,
tree_node*, tree_node*, tree_node**, int)
/home/apinski/src/upstream-gcc/gcc/gcc/cp/call.c:6768
0xc1ead3 build_x_binary_op(op_location_t const&, tree_code, tree_node*,
tree_code, tree_node*, tree_code, tree_node**, int)
/home/apinski/src/upstream-gcc/gcc/gcc/cp/typeck.c:4480
0xb95898 tsubst_copy_and_build(tree_node*, tree_node*, int, tree_node*, bool,
bool)
/home/apinski/src/upstream-gcc/gcc/gcc/cp/pt.c:20074
0xba60ce tsubst(tree_node*, tree_node*, int, tree_node*)
/home/apinski/src/upstream-gcc/gcc/gcc/cp/pt.c:16181
0xa97631 dump_template_bindings
/home/apinski/src/upstream-gcc/gcc/gcc/cp/error.c:486
0xa90a8a dump_function_decl
/home/apinski/src/upstream-gcc/gcc/gcc/cp/error.c:1806
0xa98dc4 decl_to_string
/home/apinski/src/upstream-gcc/gcc/gcc/cp/error.c:3226
0xa98dc4 cp_printer
/home/apinski/src/upstream-gcc/gcc/gcc/cp/error.c:4397
0x2118a6c pp_format(pretty_printer*, text_info*)
/home/apinski/src/upstream-gcc/gcc/gcc/pretty-print.c:1475
0x211ac00 pp_format_verbatim(pretty_printer*, text_info*)
/home/apinski/src/upstream-gcc/gcc/gcc/pretty-print.c:1536
0x211ac00 pp_verbatim(pretty_printer*, char const*, ...)
/home/apinski/src/upstream-gcc/gcc/gcc/pretty-print.c:1790
Please submit a full bug report,
with preprocessed source if appropriate.
Please include the complete backtrace with any bug report.
See  for instructions.

[Bug c++/96533] ICE with three-way comparison when error occurs in templated operator< overload and -Wunused-parameter

2021-12-16 Thread pinskia at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=96533

Andrew Pinski  changed:

   What|Removed |Added

  Attachment #52015|0   |1
is obsolete||

--- Comment #7 from Andrew Pinski  ---
Created attachment 52016
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=52016=edit
A little more

The main thing is __not_overloaded and the other operator< really.

[Bug c++/96533] ICE with three-way comparison when error occurs in templated operator< overload and -Wunused-parameter

2021-12-16 Thread pinskia at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=96533

Andrew Pinski  changed:

   What|Removed |Added

  Attachment #52014|0   |1
is obsolete||

--- Comment #6 from Andrew Pinski  ---
Created attachment 52015
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=52015=edit
A little smaller

[Bug c++/96533] ICE with three-way comparison when error occurs in templated operator< overload and -Wunused-parameter

2021-12-16 Thread pinskia at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=96533

Andrew Pinski  changed:

   What|Removed |Added

  Known to work|12.0|

--- Comment #5 from Andrew Pinski  ---
I can only figure out that it has something to do with __ptr_cmp template
class.

[Bug c++/96533] ICE with three-way comparison when error occurs in templated operator< overload and -Wunused-parameter

2021-12-16 Thread pinskia at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=96533

--- Comment #4 from Andrew Pinski  ---
Created attachment 52014
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=52014=edit
Reduced as I can get it right now

[Bug c++/96533] ICE with three-way comparison when error occurs in templated operator< overload and -Wunused-parameter

2021-12-16 Thread pinskia at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=96533

--- Comment #3 from Andrew Pinski  ---
Reducing