https://gcc.gnu.org/bugzilla/show_bug.cgi?id=100975

--- Comment #2 from Marek Polacek <mpolacek at gcc dot gnu.org> ---
Looks like just disabling the check in create_array_type_for_decl lets us
compile:

struct false_type { static constexpr bool value = false; };
struct true_type { static constexpr bool value = true; };
template<class T, class U>
struct is_same : false_type {}; 
template<class T>
struct is_same<T, T> : true_type {};

void
g ()
{
  int a[3];
  auto (*p)[3] = &a;
  auto (&r)[3] = a;
  static_assert (is_same<decltype (p), int(*)[3]>::value);
  static_assert (is_same<decltype (r), int(&)[3]>::value);
}

Reply via email to