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

            Bug ID: 101379
           Summary: libatomic build failure on arm after r12-2132
           Product: gcc
           Version: 9.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: tree-optimization
          Assignee: unassigned at gcc dot gnu.org
          Reporter: clyon at gcc dot gnu.org
  Target Milestone: ---

After r12-2132, I've noticed a build failure in libatomic for arm. It can be
reproduced with --target arm-linux-gnueabi (not with arm-eabi):

In file included from
/home/christophe.lyon/src/GCC/sources/gcc-fsf-git/trunk/libatomic/config/arm/host-config.h:4,
                 from
/home/christophe.lyon/src/GCC/sources/gcc-fsf-git/trunk/libatomic/libatomic_i.h:232,
                 from
/home/christophe.lyon/src/GCC/sources/gcc-fsf-git/trunk/libatomic/gstore.c:25:
/home/christophe.lyon/src/GCC/sources/gcc-fsf-git/trunk/libatomic/gstore.c: In
function 'libat_store':
/home/christophe.lyon/src/GCC/sources/gcc-fsf-git/trunk/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)
      |                                 ~^~~~~~~~~~~~~~~~~~~~~~~~~~~~
/home/christophe.lyon/src/GCC/sources/gcc-fsf-git/trunk/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)
      |                          ^~~~~~~~~~~~~~~~~~~~~~~
/home/christophe.lyon/src/GCC/sources/gcc-fsf-git/trunk/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)
      |                                                         ^~~~~~~~~~~~
/home/christophe.lyon/src/GCC/sources/gcc-fsf-git/trunk/libatomic/libatomic_i.h:40:25:
note: in expansion of macro 'MAYBE_HAVE_ATOMIC_CAS_8'
   40 | #define C2_(X,Y)        X ## Y            
      |                         ^                 
/home/christophe.lyon/src/GCC/sources/gcc-fsf-git/trunk/libatomic/libatomic_i.h:41:25:
note: in expansion of macro 'C2_'
   41 | #define C2(X,Y)         C2_(X,Y)    
      |                         ^~~  
/home/christophe.lyon/src/GCC/sources/gcc-fsf-git/trunk/libatomic/gstore.c:58:10:
note: in expansion of macro 'C2'
   58 |     if (!C2(MAYBE_HAVE_ATOMIC_CAS_,N)) break;                   \
      |          ^~                                                      
/home/christophe.lyon/src/GCC/sources/gcc-fsf-git/trunk/libatomic/gstore.c:95:25:
note: in expansion of macro 'LARGER'
   95 |     case 5 ... 7: L8:   LARGER(8);      /* FALLTHRU */
      |                         ^~~~~~
cc1: all warnings being treated as errors
make[4]: *** [Makefile:586: gstore.lo] Error 1

Reply via email to