Re: [PATCH] varasm: Fix type confusion bug

2022-12-01 Thread Alex Coplan via Gcc-patches
On 01/12/2022 16:12, Richard Sandiford wrote: > Alex Coplan via Gcc-patches writes: > > Hi, > > > > This patch fixes a type confusion bug in varasm.cc:assemble_variable. > > The problem is that the current code calls: > > > > sect = get_variable_section (decl, false); > > > > and then accesses s

Re: [PATCH] varasm: Fix type confusion bug

2022-12-01 Thread Richard Sandiford via Gcc-patches
Alex Coplan via Gcc-patches writes: > Hi, > > This patch fixes a type confusion bug in varasm.cc:assemble_variable. > The problem is that the current code calls: > > sect = get_variable_section (decl, false); > > and then accesses sect->named.name without checking whether the section > is in fac

[PATCH] varasm: Fix type confusion bug

2022-12-01 Thread Alex Coplan via Gcc-patches
Hi, This patch fixes a type confusion bug in varasm.cc:assemble_variable. The problem is that the current code calls: sect = get_variable_section (decl, false); and then accesses sect->named.name without checking whether the section is in fact a named section. In the surrounding else clause, w