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

            Bug ID: 124656
           Summary: [16 Regression] [UBSAN] check.cc:4100:13: runtime
                    error
           Product: gcc
           Version: 16.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: fortran
          Assignee: unassigned at gcc dot gnu.org
          Reporter: dcb314 at hotmail dot com
  Target Milestone: ---

The following much reduced F90 program seems to cause trouble 
with UBSAN on ARM 32:

     a=max(i8y,A2=i8z)
      end

$ ~/gcc/results/bin/gfortran -c -w three.f90
../../trunk/gcc/fortran/check.cc:4100:13: runtime error: store to address
0xffd3c124 with insufficient space for an object of type 'int'
0xffd3c124: note: pointer points here
  7c 32 bc 06 00 85 c8 05  00 00 00 00 01 00 00 00  a4 c1 d3 ff 00 00 00 00  04
00 00 00 01 00 00 00
              ^ 
    #0 0x00376708 in min_max_args ../../trunk/gcc/fortran/check.cc:4100

gfortran 15.2.0 seems happy with it:

$ ~/gcc/results.15.2.0/bin/gfortran -c -w three.f90
$ 

The problem first seems to occur sometime between date
20260305 (g:ee8ca6c927ec949a) and 20260309 (g:ee8ca6c927ec949a).

Compiler is

$ /home/dcb/gcc/results/bin/gfortran -v 
Using built-in specs.
COLLECT_GCC=/home/dcb/gcc/results/bin/gfortran
COLLECT_LTO_WRAPPER=/home/dcb/gcc/results.20260324.ubsan/libexec/gcc/arm-linux-gnueabihf/16.0.1/lto-wrapper
Target: arm-linux-gnueabihf
Configured with: ../trunk/configure
--prefix=/home/dcb/gcc/results.20260324.ubsan --disable-doc --disable-multilib
--with-build-config=bootstrap-ubsan --with-pkgversion=c4fe97077571e183
--enable-checking=yes --enable-languages=c,c++,fortran --with-cpu=cortex-a76
--with-fpu=neon-fp-armv8 --with-float=hard --build=arm-linux-gnueabihf
--host=arm-linux-gnueabihf --target=arm-linux-gnueabihf
Thread model: posix
Supported LTO compression algorithms: zlib
gcc version 16.0.1 20260324 (experimental) (c4fe97077571e183) 
$

Reply via email to