https://gcc.gnu.org/bugzilla/show_bug.cgi?id=115009
--- Comment #10 from Aldy Hernandez <aldyh at gcc dot gnu.org> ---
(In reply to Andrew Pinski from comment #7)
> For rl78:
> static scalar_int_mode
> rl78_addr_space_address_mode (addr_space_t addrspace)
> {
> switch (addrspace)
> {
> case ADDR_SPACE_GENERIC:
> return HImode;
> case ADDR_SPACE_NEAR:
> return HImode;
> case ADDR_SPACE_FAR:
> return SImode;
> default:
> gcc_unreachable ();
> }
> }
>
> So yes it is obvious that address space can have different sizes for
> pointers ...
I can test my proposed patch on a cross for avr, but for this testcase on
rl78-none and rl78-elf, I get:
a.c:1:8: error: unknown type name ‘scalar_int_mode’
1 | static scalar_int_mode
| ^~~~~~~~~~~~~~~
a.c:2:31: error: unknown type name ‘addr_space_t’
2 | rl78_addr_space_address_mode (addr_space_t addrspace)
| ^~~~~~~~~~~~
Either way...could someone be so kind as to test on avr and rl78 to see if this
fixes the problem?