* [Bug fortran/103115] reallocation of character array fails when appending a constant size 4 array
2021-11-07 11:01 [Bug fortran/103115] New: reallocation of character array fails when appending a constant size 4 array ygalklein at gmail dot com
@ 2021-11-07 11:05 ` ygalklein at gmail dot com
2021-11-15 19:32 ` [Bug fortran/103115] [12 Regression] " tkoenig at gcc dot gnu.org
` (8 subsequent siblings)
9 siblings, 0 replies; 11+ messages in thread
From: ygalklein at gmail dot com @ 2021-11-07 11:05 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=103115
--- Comment #1 from ygal klein <ygalklein at gmail dot com> ---
I see that in the first program I gave as an example I forgot to insert the
line
write(*, "('size(titles) = ',i1)") size(titles)
bf the block
anyway - it is there (one can see the output).
^ permalink raw reply [flat|nested] 11+ messages in thread
* [Bug fortran/103115] [12 Regression] reallocation of character array fails when appending a constant size 4 array
2021-11-07 11:01 [Bug fortran/103115] New: reallocation of character array fails when appending a constant size 4 array ygalklein at gmail dot com
2021-11-07 11:05 ` [Bug fortran/103115] " ygalklein at gmail dot com
@ 2021-11-15 19:32 ` tkoenig at gcc dot gnu.org
2021-11-16 12:29 ` juergen.reuter at desy dot de
` (7 subsequent siblings)
9 siblings, 0 replies; 11+ messages in thread
From: tkoenig at gcc dot gnu.org @ 2021-11-15 19:32 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=103115
Thomas Koenig <tkoenig at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Keywords| |ice-on-valid-code,
| |wrong-code
Status|UNCONFIRMED |NEW
Summary|reallocation of character |[12 Regression]
|array fails when appending |reallocation of character
|a constant size 4 array |array fails when appending
| |a constant size 4 array
Ever confirmed|0 |1
Target Milestone|--- |12.0
Last reconfirmed| |2021-11-15
CC| |tkoenig at gcc dot gnu.org
--- Comment #2 from Thomas Koenig <tkoenig at gcc dot gnu.org> ---
I can confirm the bug with gcc 9 (didn't check any other
version).
Current trunk gives me
.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
0x1002ebcf tree_check_failed(tree_node const*, char const*, int, char const*,
...)
../../trunk/gcc/tree.c:8689
0x101d89bf tree_int_cst_elt_check(tree_node*, int, char const*, int, char
const*)
../../trunk/gcc/tree.h:3633
0x101d89bf tree_int_cst_elt_check(tree_node*, int, char const*, int, char
const*)
../../trunk/gcc/tree.h:3629
0x101d89bf gfc_trans_array_constructor_value
../../trunk/gcc/fortran/trans-array.c:2187
0x101d9563 trans_array_constructor
../../trunk/gcc/fortran/trans-array.c:2900
0x101d9563 gfc_add_loop_ss_code
../../trunk/gcc/fortran/trans-array.c:3180
0x101d9f6f gfc_conv_loop_setup(gfc_loopinfo*, locus*)
../../trunk/gcc/fortran/trans-array.c:5430
0x102350db gfc_trans_assignment_1
../../trunk/gcc/fortran/trans-expr.c:11642
0x101ba337 trans_code
../../trunk/gcc/fortran/trans.c:1916
Marking as regression for the ICE at least.
^ permalink raw reply [flat|nested] 11+ messages in thread
* [Bug fortran/103115] [12 Regression] reallocation of character array fails when appending a constant size 4 array
2021-11-07 11:01 [Bug fortran/103115] New: reallocation of character array fails when appending a constant size 4 array ygalklein at gmail dot com
2021-11-07 11:05 ` [Bug fortran/103115] " ygalklein at gmail dot com
2021-11-15 19:32 ` [Bug fortran/103115] [12 Regression] " tkoenig at gcc dot gnu.org
@ 2021-11-16 12:29 ` juergen.reuter at desy dot de
2021-11-16 13:07 ` tkoenig at gcc dot gnu.org
` (6 subsequent siblings)
9 siblings, 0 replies; 11+ messages in thread
From: juergen.reuter at desy dot de @ 2021-11-16 12:29 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=103115
Jürgen Reuter <juergen.reuter at desy dot de> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |juergen.reuter at desy dot de
--- Comment #3 from Jürgen Reuter <juergen.reuter at desy dot de> ---
(In reply to Thomas Koenig from comment #2)
> I can confirm the bug with gcc 9 (didn't check any other
> version).
>
> Current trunk gives me
>
> .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
> 0x1002ebcf tree_check_failed(tree_node const*, char const*, int, char
> const*, ...)
> ../../trunk/gcc/tree.c:8689
> 0x101d89bf tree_int_cst_elt_check(tree_node*, int, char const*, int, char
> const*)
> ../../trunk/gcc/tree.h:3633
> 0x101d89bf tree_int_cst_elt_check(tree_node*, int, char const*, int, char
> const*)
> ../../trunk/gcc/tree.h:3629
> 0x101d89bf gfc_trans_array_constructor_value
> ../../trunk/gcc/fortran/trans-array.c:2187
> 0x101d9563 trans_array_constructor
> ../../trunk/gcc/fortran/trans-array.c:2900
> 0x101d9563 gfc_add_loop_ss_code
> ../../trunk/gcc/fortran/trans-array.c:3180
> 0x101d9f6f gfc_conv_loop_setup(gfc_loopinfo*, locus*)
> ../../trunk/gcc/fortran/trans-array.c:5430
> 0x102350db gfc_trans_assignment_1
> ../../trunk/gcc/fortran/trans-expr.c:11642
> 0x101ba337 trans_code
> ../../trunk/gcc/fortran/trans.c:1916
>
> Marking as regression for the ICE at least.
Thomas, are you sure? I cannot see an ICE, neither with the master from
September 21 nor with the master from yesterday.
^ permalink raw reply [flat|nested] 11+ messages in thread
* [Bug fortran/103115] [12 Regression] reallocation of character array fails when appending a constant size 4 array
2021-11-07 11:01 [Bug fortran/103115] New: reallocation of character array fails when appending a constant size 4 array ygalklein at gmail dot com
` (2 preceding siblings ...)
2021-11-16 12:29 ` juergen.reuter at desy dot de
@ 2021-11-16 13:07 ` tkoenig at gcc dot gnu.org
2021-11-16 15:42 ` tkoenig at gcc dot gnu.org
` (5 subsequent siblings)
9 siblings, 0 replies; 11+ messages in thread
From: tkoenig at gcc dot gnu.org @ 2021-11-16 13:07 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=103115
--- Comment #4 from Thomas Koenig <tkoenig at gcc dot gnu.org> ---
(In reply to Jürgen Reuter from comment #3)
> Thomas, are you sure? I cannot see an ICE, neither with the master from
> September 21 nor with the master from yesterday.
I see the ICE with
gcc version 12.0.0 20211028 (experimental) (GCC)
I'll run a bootstrap and re-check.
^ permalink raw reply [flat|nested] 11+ messages in thread
* [Bug fortran/103115] [12 Regression] reallocation of character array fails when appending a constant size 4 array
2021-11-07 11:01 [Bug fortran/103115] New: reallocation of character array fails when appending a constant size 4 array ygalklein at gmail dot com
` (3 preceding siblings ...)
2021-11-16 13:07 ` tkoenig at gcc dot gnu.org
@ 2021-11-16 15:42 ` tkoenig at gcc dot gnu.org
2021-11-17 9:07 ` juergen.reuter at desy dot de
` (4 subsequent siblings)
9 siblings, 0 replies; 11+ messages in thread
From: tkoenig at gcc dot gnu.org @ 2021-11-16 15:42 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=103115
--- Comment #5 from Thomas Koenig <tkoenig at gcc dot gnu.org> ---
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:
tkoenig@gcc135 ~]$ gfortran -v
Using built-in specs.
COLLECT_GCC=gfortran
COLLECT_LTO_WRAPPER=/home/tkoenig/libexec/gcc/powerpc64le-unknown-linux-gnu/12.0.0/lto-wrapper
Target: powerpc64le-unknown-linux-gnu
Configured with: ../trunk/configure --prefix=/home/tkoenig
--enable-languages=c,c++,fortran
Thread model: posix
Supported LTO compression algorithms: zlib
gcc version 12.0.0 20211116 (experimental) (GCC)
[tkoenig@gcc135 ~]$ gfortran a.f90
a.f90:10:13:
10 | ]
| 1
internal compiler error: tree check: expected integer_cst, have save_expr in
gfc_trans_array_constructor_value, at fortran/trans-array.c:2187
0x1025d7ff tree_check_failed(tree_node const*, char const*, int, char const*,
...)
../../trunk/gcc/tree.c:8701
0x10408c23 tree_int_cst_elt_check(tree_node*, int, char const*, int, char
const*)
../../trunk/gcc/tree.h:3641
^ permalink raw reply [flat|nested] 11+ messages in thread
* [Bug fortran/103115] [12 Regression] reallocation of character array fails when appending a constant size 4 array
2021-11-07 11:01 [Bug fortran/103115] New: reallocation of character array fails when appending a constant size 4 array ygalklein at gmail dot com
` (4 preceding siblings ...)
2021-11-16 15:42 ` tkoenig at gcc dot gnu.org
@ 2021-11-17 9:07 ` juergen.reuter at desy dot de
2021-11-17 16:30 ` tkoenig at gcc dot gnu.org
` (3 subsequent siblings)
9 siblings, 0 replies; 11+ messages in thread
From: juergen.reuter at desy dot de @ 2021-11-17 9:07 UTC (permalink / raw)
To: gcc-bugs
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.
^ permalink raw reply [flat|nested] 11+ messages in thread
* [Bug fortran/103115] [12 Regression] reallocation of character array fails when appending a constant size 4 array
2021-11-07 11:01 [Bug fortran/103115] New: reallocation of character array fails when appending a constant size 4 array ygalklein at gmail dot com
` (5 preceding siblings ...)
2021-11-17 9:07 ` juergen.reuter at desy dot de
@ 2021-11-17 16:30 ` tkoenig at gcc dot gnu.org
2022-01-17 13:00 ` rguenth at gcc dot gnu.org
` (2 subsequent siblings)
9 siblings, 0 replies; 11+ messages in thread
From: tkoenig at gcc dot gnu.org @ 2021-11-17 16:30 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=103115
--- Comment #7 from Thomas Koenig <tkoenig at gcc dot gnu.org> ---
(In reply to Jürgen Reuter from comment #6)
> 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!?
Extremely likely.
--enable-checking=release turns off a very large number of checks
which are really only interesting for developers to find bugs,
and which make the compiler run rather slowly.
^ permalink raw reply [flat|nested] 11+ messages in thread
* [Bug fortran/103115] [12 Regression] reallocation of character array fails when appending a constant size 4 array
2021-11-07 11:01 [Bug fortran/103115] New: reallocation of character array fails when appending a constant size 4 array ygalklein at gmail dot com
` (6 preceding siblings ...)
2021-11-17 16:30 ` tkoenig at gcc dot gnu.org
@ 2022-01-17 13:00 ` rguenth at gcc dot gnu.org
2022-05-06 8:31 ` [Bug fortran/103115] [12/13 " jakub at gcc dot gnu.org
2023-05-08 12:23 ` [Bug fortran/103115] [12/13/14 " rguenth at gcc dot gnu.org
9 siblings, 0 replies; 11+ messages in thread
From: rguenth at gcc dot gnu.org @ 2022-01-17 13:00 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=103115
Richard Biener <rguenth at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Priority|P3 |P4
^ permalink raw reply [flat|nested] 11+ messages in thread
* [Bug fortran/103115] [12/13 Regression] reallocation of character array fails when appending a constant size 4 array
2021-11-07 11:01 [Bug fortran/103115] New: reallocation of character array fails when appending a constant size 4 array ygalklein at gmail dot com
` (7 preceding siblings ...)
2022-01-17 13:00 ` rguenth at gcc dot gnu.org
@ 2022-05-06 8:31 ` jakub at gcc dot gnu.org
2023-05-08 12:23 ` [Bug fortran/103115] [12/13/14 " rguenth at gcc dot gnu.org
9 siblings, 0 replies; 11+ messages in thread
From: jakub at gcc dot gnu.org @ 2022-05-06 8:31 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=103115
Jakub Jelinek <jakub at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Target Milestone|12.0 |12.2
--- Comment #8 from Jakub Jelinek <jakub at gcc dot gnu.org> ---
GCC 12.1 is being released, retargeting bugs to GCC 12.2.
^ permalink raw reply [flat|nested] 11+ messages in thread
* [Bug fortran/103115] [12/13/14 Regression] reallocation of character array fails when appending a constant size 4 array
2021-11-07 11:01 [Bug fortran/103115] New: reallocation of character array fails when appending a constant size 4 array ygalklein at gmail dot com
` (8 preceding siblings ...)
2022-05-06 8:31 ` [Bug fortran/103115] [12/13 " jakub at gcc dot gnu.org
@ 2023-05-08 12:23 ` rguenth at gcc dot gnu.org
9 siblings, 0 replies; 11+ messages in thread
From: rguenth at gcc dot gnu.org @ 2023-05-08 12:23 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=103115
Richard Biener <rguenth at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Target Milestone|12.3 |12.4
--- Comment #10 from Richard Biener <rguenth at gcc dot gnu.org> ---
GCC 12.3 is being released, retargeting bugs to GCC 12.4.
^ permalink raw reply [flat|nested] 11+ messages in thread