https://gcc.gnu.org/bugzilla/show_bug.cgi?id=117167
Andrew Pinski <pinskia at gcc dot gnu.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Known to fail| |9.1.0 Ever confirmed|0 |1 Status|UNCONFIRMED |NEW Last reconfirmed| |2024-10-17 --- Comment #2 from Andrew Pinski <pinskia at gcc dot gnu.org> --- Confirmed. Easier to understand testcase: ``` struct a1 {}; typedef struct a1 *a; a b(const a) __attribute__((const)); a b(const a t) {} void main() { a c = b(c); } ``` The typedef is needed. I don't know why though.