https://gcc.gnu.org/bugzilla/show_bug.cgi?id=108390
Andrew Pinski <pinskia at gcc dot gnu.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Keywords| |ice-on-invalid-code Status|UNCONFIRMED |NEW Last reconfirmed| |2023-01-13 Ever confirmed|0 |1 See Also| |https://gcc.gnu.org/bugzill | |a/show_bug.cgi?id=79092 --- Comment #2 from Andrew Pinski <pinskia at gcc dot gnu.org> --- I suspect the patch for PR79092 cahnged the behavior in GCC 8. I don't see how this can't be ambiguous. It is odd that clang accepts it. This C++20 testcase also causes the ICE and clang rejects it as ambiguous: ``` template<auto t> long f(int(*)[t], int(*)[t]); template<int i> int f(int(*)[i], int(*)[i]); int n = f<2>(0, 0); ``` So at least ICE on invalid.