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

            Bug ID: 124631
           Summary: [16 Regression] [UBSAN] simplify.cc:3088:12: 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: ---

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

For the Fortran 90 source code file Fortran/0282/0282_0142.f90
from the Fujitsu test suite on github at

https://github.com/fujitsu/compiler-test-suite

recent gfortran does this:

$ for i in ~/gcc/results.20260*/bin/gfortran; do echo $i; $i -c -w
trunk/Fortran/0282/0282_0142.f90; done 
/home/dcb/gcc/results.20260305.ubsan/bin/gfortran
/home/dcb/gcc/results.20260309.ubsan/bin/gfortran
../../trunk/gcc/fortran/simplify.cc:3088:12: runtime error: pointer index
expres
sion with base 0x0b8b36e8 overflowed to 0xea3d9fa8
    #0 0x00736a40 in gfc_simplify_eoshift(gfc_expr*, gfc_expr*, gfc_expr*,
gfc_e
xpr*) ../../trunk/gcc/fortran/simplify.cc:3088
    #1 0x004ebf08 in do_simplify ../../trunk/gcc/fortran/intrinsic.cc:4917


Latest release seems happy with it:

$ ~/gcc/results.15.2.0/bin/gfortran -c -w trunk/Fortran/0282/0282_0142.f90
$ 

$ /home/dcb/gcc/results.20260305.ubsan/bin/gfortran -v 2>&1 | grep exp
gcc version 16.0.1 20260305 (experimental) (ee8ca6c927ec949a) 
$ /home/dcb/gcc/results.20260309.ubsan/bin/gfortran -v 2>&1 | grep exp
gcc version 16.0.1 20260309 (experimental) (ede3dd56e6324578) 
$ 

This is on a 32 ARM raspberry PI:

$ /home/dcb/gcc/results.20260309.ubsan/bin/gfortran -v 
Using built-in specs.
COLLECT_GCC=/home/dcb/gcc/results.20260309.ubsan/bin/gfortran
COLLECT_LTO_WRAPPER=/home/dcb/gcc/results.20260309.ubsan/libexec/gcc/arm-linux-gnueabihf/16.0.1/lto-wrapper
Target: arm-linux-gnueabihf
Configured with: ../trunk/configure
--prefix=/home/dcb/gcc/results.20260309.ubsan --disable-doc --disable-multilib
--with-build-config=bootstrap-ubsan --with-pkgversion=ede3dd56e6324578
--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 20260309 (experimental) (ede3dd56e6324578) 
$

Reply via email to