This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug fortran/67496] trans-array.c sanitizer runtime error: load of value 124, which is not a valid value for type 'bool'
- From: "dominiq at lps dot ens.fr" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Sat, 30 Apr 2016 14:43:04 +0000
- Subject: [Bug fortran/67496] trans-array.c sanitizer runtime error: load of value 124, which is not a valid value for type 'bool'
- Auto-submitted: auto-generated
- References: <bug-67496-4 at http dot gcc dot gnu dot org/bugzilla/>
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=67496
--- Comment #6 from Dominique d'Humieres <dominiq at lps dot ens.fr> ---
I finally managed to build gcc with -fsanitize=undefined:
Using built-in specs.
COLLECT_GCC=gfcg
COLLECT_LTO_WRAPPER=/opt/gcc/gcc7g/libexec/gcc/x86_64-apple-darwin15.4.0/7.0.0/lto-wrapper
Target: x86_64-apple-darwin15.4.0
Configured with: ../work/configure --prefix=/opt/gcc/gcc7g
--enable-languages=c,c++,fortran --with-gmp=/opt/mp-new --with-system-zlib
--with-isl=/opt/mp-new --disable-bootstrap --disable-multilib
--disable-libstdcxx CFLAGS='-L/opt/gcc/gcc7a/lib -lubsan -fsanitize=undefined
-Og -g -fno-omit-frame-pointer' CXXFLAGS='-fsanitize=undefined -Og -g
-fno-omit-frame-pointer' LDFLAGS='-L/opt/gcc/gcc7a/lib -lubsan -ldl -lpthread'
: (reconfigured) ../work/configure --prefix=/opt/gcc/gcc7g
--with-gmp=/opt/mp-new --with-system-zlib --with-isl=/opt/mp-new
--disable-bootstrap --disable-multilib --disable-libstdcxx
CFLAGS='-L/opt/gcc/gcc7a/lib -lubsan -fsanitize=undefined -Og -g
-fno-omit-frame-pointer' CXXFLAGS='-fsanitize=undefined -Og -g
-fno-omit-frame-pointer' LDFLAGS='-L/opt/gcc/gcc7a/lib -lubsan -ldl -lpthread'
--enable-languages=c,c++,fortran --no-create --no-recursion
Thread model: posix
gcc version 7.0.0 20160430 (experimental) [trunk revision 235678p25] (GCC)
where gcc7a is
Using built-in specs.
COLLECT_GCC=gfca
COLLECT_LTO_WRAPPER=/opt/gcc/gcc7a/libexec/gcc/x86_64-apple-darwin15.4.0/7.0.0/lto-wrapper
Target: x86_64-apple-darwin15.4.0
Configured with: ../_clean/configure --prefix=/opt/gcc/gcc7a
--enable-languages=c,c++,fortran,ada,lto --with-gmp=/opt/mp-new
--with-system-zlib --enable-checking=release --with-isl=/opt/mp-new
--enable-lto --enable-plugin
Thread model: posix
gcc version 7.0.0 20160429 (experimental) [trunk revision 235619] (GCC)
I have tried several variants of
typespec_chararray_ctor = (expr->ts.u.cl
&& expr->ts.u.cl->length_from_typespec);
without any progress. Are we sure that the problem is in gfortran and not in
ubsan?