[Bug fortran/103115] [12 Regression] reallocation of character array fails when appending a constant size 4 array

juergen.reuter at desy dot de gcc-bugzilla@gcc.gnu.org
Wed Nov 17 09:07:30 GMT 2021


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

--- Comment #6 from Jürgen Reuter <juergen.reuter at desy dot de> ---
(In reply to Thomas Koenig from comment #5)
> I can confirm the ICE with current trunk both on x86_64 and
> on POWER.
> 
> x86_64:
> 
> $ gfortran -v
> Es werden eingebaute Spezifikationen verwendet.
> COLLECT_GCC=gfortran
> COLLECT_LTO_WRAPPER=/home/ig25/libexec/gcc/x86_64-pc-linux-gnu/12.0.0/lto-
> wrapper
> Ziel: x86_64-pc-linux-gnu
> Konfiguriert mit: ../trunk/configure --prefix=/home/ig25
> --enable-languages=c,c++,fortran --enable-maintainer-mode
> Thread-Modell: posix
> Unterstützte LTO-Kompressionsalgorithmen: zlib
> gcc-Version 12.0.0 20211116 (experimental) [master revision
> e87559d202d:f4e6da6e8ac:36ec54aac7da134441c83248e14825381b8d6f17] (GCC) 
> $ gfortran a.f90 
> a.f90:10:13:
> 
>    10 |             ]
>       |             1
> interner Compiler-Fehler: tree check: expected integer_cst, have save_expr
> in gfc_trans_array_constructor_value, at fortran/trans-array.c:2187
> 0x808a8a tree_check_failed(tree_node const*, char const*, int, char const*,
> ...)
>         ../../trunk/gcc/tree.c:8701
> 
> POWER:
> 


Really interesting, I don't get an ICE with the following setup:
../configure --prefix=/usr/local/ --with-gmp=/usr/local/
--with-mpfr=/usr/local/ --with-mp=/usr/local/
--with-sysroot=/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/
--enable-checking=release --enable-languages=c,c++,fortran,lto,objc,obj-c++
$ gfortran --version
GNU Fortran (GCC) 12.0.0 20211115 (experimental)
Maybe the enable-checking setup!?

I am compiling without any flags the code snippet in the very first post in
this PR.


More information about the Gcc-bugs mailing list