On Thu, Jun 4, 2026 at 10:28 PM Martin Uecker <[email protected]> wrote:
>
> Am Donnerstag, dem 04.06.2026 um 22:29 -0600 schrieb Jeffrey Law:
> >
> > On 6/4/2026 10:13 PM, Martin Uecker wrote:
> > > Am Donnerstag, dem 04.06.2026 um 21:38 -0600 schrieb Jeffrey Law:
> > > > On 6/3/2026 1:18 PM, Martin Uecker wrote:
> > > > > Bootstrapped and regression tested on x86_64.
> > > > >
> > > > >
> > > > >       c: harmonize handling of arrays
> > > > >
> > > > >       This code harmonizes the handling of arrays in C by consistently
> > > > >       using build_index_type instead of build_range_type when creating
> > > > >       arrays and using top_array_vla_pp to detect top-level VLAs.
> > > > >
> > > > >       gcc/c-family/ChangeLog:
> > > > >               * c-common.cc (complete_array_type): Use 
> > > > > build_index_type.
> > > > >               * c-ubsan.cc (ubsan_instrument_bounds_pointer_address):
> > > > >                 Likewise.
> > > > >
> > > > >       gcc/c/ChangeLog:
> > > > >               * c-decl.cc (grokdeclarator): Likewise.
> > > > >               * c-typeck.cc (c_verify_type,c_build_array_type,
> > > > >               c_expr_countof_expr,comptypes_internal): Use 
> > > > > top_array_vla_p.
> > > > >               (top_array_vla_p): Rename to use _p convention and 
> > > > > simplify.
> > > > This is causing warning regressions on a variety of ports, including but
> > > > not limited to fr30-elf, m32r-elf, bfin-elf visium-elf, sh3-linux-gnu
> > > > c6x-elf cris-elf, etc etc.
> > > >
> > > > > Tests that now fail, but worked before (14 tests):
> > > > >
> > > > > fr30-sim: gcc: gcc.dg/Warray-bounds-52.c  (test for warnings, line 19)
> > > > > fr30-sim: gcc: gcc.dg/Warray-bounds-52.c  (test for warnings, line 20)
> > > > > fr30-sim: gcc: gcc.dg/Warray-bounds-52.c  (test for warnings, line 21)
> > > > > fr30-sim: gcc: gcc.dg/Warray-bounds-52.c  (test for warnings, line 34)
> > > > > fr30-sim: gcc: gcc.dg/Warray-bounds-52.c  (test for warnings, line 35)
> > > > > fr30-sim: gcc: gcc.dg/Warray-bounds-52.c (test for excess errors)
> > > > > fr30-sim: gcc: gcc.dg/Warray-bounds-53.c  (test for warnings, line 19)
> > > > > fr30-sim: gcc: gcc.dg/Warray-bounds-53.c  (test for warnings, line 20)
> > > > > fr30-sim: gcc: gcc.dg/Warray-bounds-53.c  (test for warnings, line 21)
> > > > > fr30-sim: gcc: gcc.dg/Warray-bounds-53.c  (test for warnings, line 34)
> > > > > fr30-sim: gcc: gcc.dg/Warray-bounds-53.c  (test for warnings, line 35)
> > > > > fr30-sim: gcc: gcc.dg/Warray-bounds-53.c (test for excess errors)
> > > Strange, I wonder whether it is related to the one build_range_type
> > > in c-common.cc
> > No clue.  I haven't debugged it at all, just did the bisection.
>
> Yes, thanks. It is related to representation of size zero arrays,
> I will fix this.

Note it looks like -m32 on x86_64-linux-gnu might also show the
failure. Or on i686-linux-gnu.

Thanks,
Andrea


>
> Martin

Reply via email to