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

            Bug ID: 119441
           Summary: -ftree-slp-vectorize causes incorrect thread_local
                    buffer offsets on arm32 (armv7hl)
           Product: gcc
           Version: 15.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: tree-optimization
          Assignee: unassigned at gcc dot gnu.org
          Reporter: n.nechaev at omp dot ru
  Target Milestone: ---

Created attachment 60860
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=60860&action=edit
Preprocessed source code

Tested on gcc built from commit a62893d71c5f48fd7780957e1ad1a4f38f351728 (as
well as several order versions, so, not a recent regression).

$ gcc -v
Using built-in specs.
COLLECT_GCC=gcc
COLLECT_LTO_WRAPPER=/usr/libexec/gcc/armv7hl-meego-linux-gnueabi/15.0.1/lto-wrapper
Target: armv7hl-meego-linux-gnueabi
Configured with:
/home/abuild/rpmbuild/BUILD/cross--gcc-12.3.1+git2+OS.30008.20250321094938.5.gd1bbfee/upstream/configure
--prefix=/usr --mandir=/usr/share/man --datadir=/usr/share
--build=armv7hl-meego-linux-gnueabi --host=armv7hl-meego-linux-gnueabi
--target=armv7hl-meego-linux-gnueabi --libdir=/usr/lib --disable-fixed-point
--disable-install-libiberty --disable-libcilkrts --disable-libgcj
--disable-libmpx --disable-libstdcxx-pch --disable-libunwind-exceptions
--disable-multilib --disable-nls --enable-__cxa_atexit
--enable-checking=release --enable-default-pie --enable-default-ssp
--enable-gnu-indirect-function --enable-gnu-unique-object
--enable-initfini-array --enable-languages=c,c++,lto --enable-linker-build-id
--enable-lto --enable-plugin --enable-shared --enable-threads=posix
--with-bugurl=https://auroraos.ru/
--with-isl=/home/abuild/rpmbuild/BUILD/isl-install --with-system-zlib
--disable-install-libssp --disable-bootstrap --disable-sjlj-exceptions
--enable-gold --with-arch=armv7-a --with-float=hard --with-fpu=neon
--with-mode=thumb --with-plugin-ld=gold
Thread model: posix
Supported LTO compression algorithms: zlib zstd
gcc version 15.0.1 20250321 (Aurora OS gcc
12.3.1+git2+OS.30008.20250321094938.5.gd1bbfee-1.38.1.omp) (GCC) 


The bug is triggered with any of the following commands (which produce no
warnings or other output on stdout/stderr):

$ g++ -o mre main.cpp -g -O1 -ftree-slp-vectorize -fPIC -pedantic -Wall -Wextra
$ g++ -o mre main.cpp -g -O1 -ftree-slp-vectorize -fPIC -pedantic -Wall -Wextra
-save-temps -fno-strict-aliasing -fwrapv -fno-aggressive-loop-optimizations
-fsanitize=address

Please, find the preprocessed file attached.

Reply via email to