https://gcc.gnu.org/bugzilla/show_bug.cgi?id=114395
--- Comment #2 from Andrew Pinski <pinskia at gcc dot gnu.org> ---
Except this works with C++20+ for GCC:
```
struct A {
int a;
};
struct B : public A {};
void f(const A &a)
{
typedef const B & Btype;
Btype b(a);
}
```
