Re: [PATCH] Add missing varasm DECL_P check.

2020-12-10 Thread Richard Sandiford via Gcc-patches
Jim Wilson writes: > This fixes a riscv64-linux bootstrap failure. > > get_constant_section calls the select_section target hook, and select_section > calls get_named_section which calls get_section. So it is possible to have > a constant not a decl in both of these functions. They already call

Re: [PATCH] Add missing varasm DECL_P check.

2020-12-09 Thread Jim Wilson
On Wed, Dec 9, 2020 at 7:14 PM H.J. Lu wrote: > A testcase? > A testcase requires the RISC-V select_section target hook, so it isn't going to be very useful. I don't see any other linux targets that have this hook defined. Just a few embedded targets. The testcase is

Re: [PATCH] Add missing varasm DECL_P check.

2020-12-09 Thread H.J. Lu via Gcc-patches
On Wed, Dec 9, 2020 at 7:10 PM Jim Wilson wrote: > > This fixes a riscv64-linux bootstrap failure. > > get_constant_section calls the select_section target hook, and select_section > calls get_named_section which calls get_section. So it is possible to have > a constant not a decl in both of

[PATCH] Add missing varasm DECL_P check.

2020-12-09 Thread Jim Wilson
This fixes a riscv64-linux bootstrap failure. get_constant_section calls the select_section target hook, and select_section calls get_named_section which calls get_section. So it is possible to have a constant not a decl in both of these functions. They already call DECL_P checks everywhere