https://gcc.gnu.org/bugzilla/show_bug.cgi?id=101553

            Bug ID: 101553
           Summary: [12 Regression] armhf builds broken on
                    -Werror=array-bounds
           Product: gcc
           Version: 12.0
            Status: UNCONFIRMED
          Keywords: build
          Severity: normal
          Priority: P3
         Component: bootstrap
          Assignee: unassigned at gcc dot gnu.org
          Reporter: tnfchris at gcc dot gnu.org
                CC: msebor at gcc dot gnu.org
  Target Milestone: ---
            Target: arm-none-linux-gnueabihf

All builds (cross and native) of arm-none-linux-gnueabihf are currently broken
and have been for a while now.

I believe it's g:a110855667782dac7b674d3e328b253b3b3c919b but haven't been able
to easily confirm as that patch can no longer be easily reverted.


Failure is in libatomic build:

hecking for suffix of object files... In file included from 
gcc/libatomic/config/arm/host-config.h:4,
                 from  gcc/libatomic/libatomic_i.h:232,
                 from  gcc/libatomic/gexch.c:25:
 gcc/libatomic/gexch.c: In function ‘libat_exchange’:
 gcc/libatomic/config/linux/arm/host-config.h:42:34: error: array subscript 0
is outside array bounds of ‘unsigned int[0]’ [-Werror=array-bounds]
   42 | #define __kernel_helper_version (*(unsigned int *)0xffff0ffc)
      |                                 ~^~~~~~~~~~~~~~~~~~~~~~~~~~~~
 gcc/libatomic/config/linux/arm/host-config.h:104:26: note: in expansion of
macro ‘__kernel_helper_version’
  104 | # define IFUNC_COND_2   (__kernel_helper_version >= 5)
      |                          ^~~~~~~~~~~~~~~~~~~~~~~
 gcc/libatomic/config/linux/arm/host-config.h:169:57: note: in expansion of
macro ‘IFUNC_COND_2’
  169 | # define MAYBE_HAVE_ATOMIC_CAS_8        (IFUNC_COND_1 | IFUNC_COND_2)
      |                                                         ^~~~~~~~~~~~
 gcc/libatomic/libatomic_i.h:40:25: note: in expansion of macro
‘MAYBE_HAVE_ATOMIC_CAS_8’
   40 | #define C2_(X,Y)        X ## Y
      |                         ^
 gcc/libatomic/libatomic_i.h:41:25: note: in expansion of macro ‘C2_’
   41 | #define C2(X,Y)         C2_(X,Y)
      |                         ^~~
 gcc/libatomic/gexch.c:58:10: note: in expansion of macro ‘C2’
   58 |     if (!C2(MAYBE_HAVE_ATOMIC_CAS_,N)) break;                   \
      |          ^~
 gcc/libatomic/gexch.c:120:25: note: in expansion of macro ‘LARGER’
  120 |     case 5 ... 7: L8:   LARGER(8);      /* FALLTHRU */
      |                         ^~~~~~

Reply via email to