[Bug c++/52830] ICE: "canonical types differ for identical types ..." when attempting SFINAE with member type

2021-12-23 Thread ppalka at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=52830

Patrick Palka  changed:

   What|Removed |Added

   Target Milestone|--- |12.0
 Resolution|--- |FIXED
 CC||ppalka at gcc dot gnu.org
 Status|REOPENED|RESOLVED

--- Comment #15 from Patrick Palka  ---
(In reply to Jason Merrill from comment #14)
> This seems to be fixed on trunk.

Looks like ever since r12-3766, which also removed the dg-ice from
constexpr-52830.C, so I suppose we can close this PR then.

[Bug c++/52830] ICE: "canonical types differ for identical types ..." when attempting SFINAE with member type

2021-12-22 Thread jason at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=52830

Jason Merrill  changed:

   What|Removed |Added

  Known to work||12.0
 CC||jason at gcc dot gnu.org

--- Comment #14 from Jason Merrill  ---
This seems to be fixed on trunk.

[Bug c++/52830] ICE: "canonical types differ for identical types ..." when attempting SFINAE with member type

2021-07-28 Thread rguenth at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=52830

Richard Biener  changed:

   What|Removed |Added

   Target Milestone|11.2|---

[Bug c++/52830] ICE: "canonical types differ for identical types ..." when attempting SFINAE with member type

2021-04-28 Thread xry111 at mengyan1223 dot wang via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=52830

Xi Ruoyao  changed:

   What|Removed |Added

 CC||xry111 at mengyan1223 dot wang

--- Comment #13 from Xi Ruoyao  ---
According to recent test results (for e.g.,
https://gcc.gnu.org/pipermail/gcc-testresults/2021-April/685744.html), it's no
longer ice-on-valid-code, but reject-valid-code now.

[Bug c++/52830] ICE: "canonical types differ for identical types ..." when attempting SFINAE with member type

2021-04-27 Thread jakub at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=52830

Jakub Jelinek  changed:

   What|Removed |Added

   Target Milestone|11.0|11.2

--- Comment #12 from Jakub Jelinek  ---
GCC 11.1 has been released, retargeting bugs to GCC 11.2.

[Bug c++/52830] ICE: "canonical types differ for identical types ..." when attempting SFINAE with member type

2021-01-14 Thread nathan at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=52830

Nathan Sidwell  changed:

   What|Removed |Added

 Status|RESOLVED|REOPENED
 Resolution|FIXED   |---
 CC||nathan at gcc dot gnu.org

--- Comment #11 from Nathan Sidwell  ---
Sadly the 'fixing' commit was buggy, see 98372.

What;s happening here is that the two declarations are not known to be the same
until the second one is complete and matched with the first.  But they contain
an instantiation over decltype(earlier_arg), and the two different
'earlier_args' have different contexts (and so we think are different from the
POV of specializations), until we do the matching up and morph the second one
into the first.  After that the two parameter instances have the same context
and so we ICE.

[Bug c++/52830] ICE: "canonical types differ for identical types ..." when attempting SFINAE with member type

2020-12-16 Thread acoplan at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=52830

--- Comment #10 from Alex Coplan  ---
Thanks. The testcase no longer ICEs on trunk.

[Bug c++/52830] ICE: "canonical types differ for identical types ..." when attempting SFINAE with member type

2020-12-15 Thread mpolacek at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=52830

Marek Polacek  changed:

   What|Removed |Added

 Status|NEW |RESOLVED
 Resolution|--- |FIXED

--- Comment #9 from Marek Polacek  ---
This was fixed in r11-5942.  Alex, please try gcc with this revision.  If your
test still ICEs, please file a bug or reopen this one.  Thanks.

[Bug c++/52830] ICE: "canonical types differ for identical types ..." when attempting SFINAE with member type

2020-11-20 Thread acoplan at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=52830

Alex Coplan  changed:

   What|Removed |Added

   Target Milestone|--- |11.0
   Last reconfirmed|2014-05-30 00:00:00 |2020-11-20
  Known to fail||11.0

[Bug c++/52830] ICE: "canonical types differ for identical types ..." when attempting SFINAE with member type

2020-11-20 Thread acoplan at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=52830

Alex Coplan  changed:

   What|Removed |Added

 CC||acoplan at gcc dot gnu.org

--- Comment #8 from Alex Coplan  ---
Hi!

This ICE (or similar) is breaking the debian build on aarch64 (specifically for
the polymake package): https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=974058

I reduced to the following (invalid) testcase which hits the ICE on trunk
(reproduced on both x86 and aarch64):

constexpr int value = 1;
struct is_derived_from_instance_of;
template  struct enable_if;
template 
using enable_if_t = typename enable_if<_Cond, _Tp>::type;
template  using is_generic_vector = is_derived_from_instance_of;
template  class matrix_methods {
  template  using is_generic_matrix = is_derived_from_instance_of;
  template  struct block_matrix {
template 
block_matrix::value>>
block_matrix::value>>

This ICEs with:

$ aarch64-elf-gcc -c test.cc
test.cc:14:70: internal compiler error: canonical types differ for identical
types 'enable_if<(value && matrix_methods::is_generic_matrix::value),
void>' and 'enable_if<(value && is_generic_vector::value), void>'
   14 |  enable_if_t::value>>
  |  ^~
0x98d86a comptypes(tree_node*, tree_node*, int)
/home/alecop01/toolchain/src/gcc/gcc/cp/typeck.c:1538
0x98eb82 same_type_ignoring_top_level_qualifiers_p(tree_node*, tree_node*)
/home/alecop01/toolchain/src/gcc/gcc/cp/typeck.c:1574
0x98cba4 structural_comptypes
/home/alecop01/toolchain/src/gcc/gcc/cp/typeck.c:1423
0x98d6bd comptypes(tree_node*, tree_node*, int)
/home/alecop01/toolchain/src/gcc/gcc/cp/typeck.c:1556
0x8b04bc template_args_equal(tree_node*, tree_node*, bool)
/home/alecop01/toolchain/src/gcc/gcc/cp/pt.c:9175
0x8afea7 comp_template_args(tree_node*, tree_node*, tree_node**, tree_node**,
bool)
/home/alecop01/toolchain/src/gcc/gcc/cp/pt.c:9222
0x8b0283 template_args_equal(tree_node*, tree_node*, bool)
/home/alecop01/toolchain/src/gcc/gcc/cp/pt.c:9146
0x8afea7 comp_template_args(tree_node*, tree_node*, tree_node**, tree_node**,
bool)
/home/alecop01/toolchain/src/gcc/gcc/cp/pt.c:9222
0x8bd1a3 spec_hasher::equal(spec_entry*, spec_entry*)
/home/alecop01/toolchain/src/gcc/gcc/cp/pt.c:1716
0x9263e3 hash_table::find_with_hash(spec_entry* const&, unsigned int)
/home/alecop01/toolchain/src/gcc/gcc/hash-table.h:923
0x8f32d8 lookup_template_class_1
/home/alecop01/toolchain/src/gcc/gcc/cp/pt.c:9830
0x8f32d8 lookup_template_class(tree_node*, tree_node*, tree_node*, tree_node*,
int, int)
/home/alecop01/toolchain/src/gcc/gcc/cp/pt.c:10186
0x941d2f finish_template_type(tree_node*, tree_node*, int)
/home/alecop01/toolchain/src/gcc/gcc/cp/semantics.c:3442
0x882bad cp_parser_template_id
/home/alecop01/toolchain/src/gcc/gcc/cp/parser.c:16967
0x8830ea cp_parser_class_name
/home/alecop01/toolchain/src/gcc/gcc/cp/parser.c:24190
0x886f96 cp_parser_qualifying_entity
/home/alecop01/toolchain/src/gcc/gcc/cp/parser.c:6861
0x886f96 cp_parser_nested_name_specifier_opt
/home/alecop01/toolchain/src/gcc/gcc/cp/parser.c:6543
0x887073 cp_parser_nested_name_specifier
/home/alecop01/toolchain/src/gcc/gcc/cp/parser.c:6787
0x887127 cp_parser_ptr_operator
/home/alecop01/toolchain/src/gcc/gcc/cp/parser.c:22243
0x87b800 cp_parser_declarator
/home/alecop01/toolchain/src/gcc/gcc/cp/parser.c:21468
Please submit a full bug report,
with preprocessed source if appropriate.
Please include the complete backtrace with any bug report.
See  for instructions.


I'm attempting to reduce a testcase which preserves the validity of the source
code, but this is proving to be much more expensive.

[Bug c++/52830] ICE: "canonical types differ for identical types ..." when attempting SFINAE with member type

2020-11-10 Thread cvs-commit at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=52830

--- Comment #7 from CVS Commits  ---
The master branch has been updated by Marek Polacek :

https://gcc.gnu.org/g:a210d404d08e363af4b2e2a60986c3cb08f8ebc5

commit r11-4890-ga210d404d08e363af4b2e2a60986c3cb08f8ebc5
Author: Marek Polacek 
Date:   Tue Nov 10 14:57:19 2020 -0500

c++: Add 5 unfixed tests.

A couple of dg-ice tests.

gcc/testsuite/ChangeLog:

PR c++/52830
PR c++/88982
PR c++/90799
PR c++/87765
PR c++/89565
* g++.dg/cpp0x/constexpr-52830.C: New test.
* g++.dg/cpp0x/vt-88982.C: New test.
* g++.dg/cpp1z/class-deduction76.C: New test.
* g++.dg/cpp1z/constexpr-lambda26.C: New test.
* g++.dg/cpp2a/nontype-class39.C: New test.

[Bug c++/52830] ICE: "canonical types differ for identical types ..." when attempting SFINAE with member type

2019-02-07 Thread mpolacek at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=52830

Marek Polacek  changed:

   What|Removed |Added

 CC||mpolacek at gcc dot gnu.org

--- Comment #6 from Marek Polacek  ---
ICEs with current trunk still.

[Bug c++/52830] ICE: "canonical types differ for identical types ..." when attempting SFINAE with member type

2016-09-03 Thread vries at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=52830

Tom de Vries  changed:

   What|Removed |Added

 CC||vries at gcc dot gnu.org

--- Comment #5 from Tom de Vries  ---
PR77427 comment 6 contains untested patch that fixes all these test-cases.