* [Bug fortran/102620] [12 Regression] ICE in gfc_get_array_span, at fortran/trans-array.c:865
2021-10-05 18:34 [Bug fortran/102620] New: [12 Regression] ICE in gfc_get_array_span, at fortran/trans-array.c:865 gscfq@t-online.de
@ 2021-10-05 18:35 ` gscfq@t-online.de
2021-10-05 19:22 ` anlauf at gcc dot gnu.org
` (11 subsequent siblings)
12 siblings, 0 replies; 14+ messages in thread
From: gscfq@t-online.de @ 2021-10-05 18:35 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=102620
G. Steinmetz <gscfq@t-online.de> changed:
What |Removed |Added
----------------------------------------------------------------------------
Keywords| |ice-on-invalid-code
--- Comment #1 from G. Steinmetz <gscfq@t-online.de> ---
This variant compiles and runs, but should also give an error :
$ cat z2.f90
program p
character(3), allocatable :: y(:)
y = ['abc', 'xyz']
call s(y)
contains
subroutine s(x)
character(*), allocatable :: x(:)
integer :: i
print *, [(len_trim(x(i)), i=1,size(x%len))]
end
end
$ gfortran-12-20211003 z2.f90 && ./a.out
3 3
$
^ permalink raw reply [flat|nested] 14+ messages in thread
* [Bug fortran/102620] [12 Regression] ICE in gfc_get_array_span, at fortran/trans-array.c:865
2021-10-05 18:34 [Bug fortran/102620] New: [12 Regression] ICE in gfc_get_array_span, at fortran/trans-array.c:865 gscfq@t-online.de
2021-10-05 18:35 ` [Bug fortran/102620] " gscfq@t-online.de
@ 2021-10-05 19:22 ` anlauf at gcc dot gnu.org
2021-10-06 8:41 ` rguenth at gcc dot gnu.org
` (10 subsequent siblings)
12 siblings, 0 replies; 14+ messages in thread
From: anlauf at gcc dot gnu.org @ 2021-10-05 19:22 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=102620
anlauf at gcc dot gnu.org changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|UNCONFIRMED |NEW
CC| |anlauf at gcc dot gnu.org
Last reconfirmed| |2021-10-05
Ever confirmed|0 |1
--- Comment #2 from anlauf at gcc dot gnu.org ---
Confirmed.
Reduced testcase:
subroutine s(x)
character(*) :: x(:)
print *, size (x%len)
end
^ permalink raw reply [flat|nested] 14+ messages in thread
* [Bug fortran/102620] [12 Regression] ICE in gfc_get_array_span, at fortran/trans-array.c:865
2021-10-05 18:34 [Bug fortran/102620] New: [12 Regression] ICE in gfc_get_array_span, at fortran/trans-array.c:865 gscfq@t-online.de
2021-10-05 18:35 ` [Bug fortran/102620] " gscfq@t-online.de
2021-10-05 19:22 ` anlauf at gcc dot gnu.org
@ 2021-10-06 8:41 ` rguenth at gcc dot gnu.org
2021-10-11 8:26 ` [Bug fortran/102620] [12 Regression] ICE in gfc_get_array_span, at fortran/trans-array.c:865 since r12-1233-gd514626ee2566c68 marxin at gcc dot gnu.org
` (9 subsequent siblings)
12 siblings, 0 replies; 14+ messages in thread
From: rguenth at gcc dot gnu.org @ 2021-10-06 8:41 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=102620
Richard Biener <rguenth at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Priority|P3 |P4
Target Milestone|--- |12.0
^ permalink raw reply [flat|nested] 14+ messages in thread
* [Bug fortran/102620] [12 Regression] ICE in gfc_get_array_span, at fortran/trans-array.c:865 since r12-1233-gd514626ee2566c68
2021-10-05 18:34 [Bug fortran/102620] New: [12 Regression] ICE in gfc_get_array_span, at fortran/trans-array.c:865 gscfq@t-online.de
` (2 preceding siblings ...)
2021-10-06 8:41 ` rguenth at gcc dot gnu.org
@ 2021-10-11 8:26 ` marxin at gcc dot gnu.org
2022-05-06 8:31 ` [Bug fortran/102620] [12/13 " jakub at gcc dot gnu.org
` (8 subsequent siblings)
12 siblings, 0 replies; 14+ messages in thread
From: marxin at gcc dot gnu.org @ 2021-10-11 8:26 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=102620
Martin Liška <marxin at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Summary|[12 Regression] ICE in |[12 Regression] ICE in
|gfc_get_array_span, at |gfc_get_array_span, at
|fortran/trans-array.c:865 |fortran/trans-array.c:865
| |since
| |r12-1233-gd514626ee2566c68
CC| |jrfsousa at gcc dot gnu.org,
| |marxin at gcc dot gnu.org
--- Comment #3 from Martin Liška <marxin at gcc dot gnu.org> ---
Confirmed, started with r12-1233-gd514626ee2566c68.
^ permalink raw reply [flat|nested] 14+ messages in thread
* [Bug fortran/102620] [12/13 Regression] ICE in gfc_get_array_span, at fortran/trans-array.c:865 since r12-1233-gd514626ee2566c68
2021-10-05 18:34 [Bug fortran/102620] New: [12 Regression] ICE in gfc_get_array_span, at fortran/trans-array.c:865 gscfq@t-online.de
` (3 preceding siblings ...)
2021-10-11 8:26 ` [Bug fortran/102620] [12 Regression] ICE in gfc_get_array_span, at fortran/trans-array.c:865 since r12-1233-gd514626ee2566c68 marxin at gcc dot gnu.org
@ 2022-05-06 8:31 ` jakub at gcc dot gnu.org
2023-05-08 12:22 ` [Bug fortran/102620] [12/13/14 " rguenth at gcc dot gnu.org
` (7 subsequent siblings)
12 siblings, 0 replies; 14+ 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=102620
Jakub Jelinek <jakub at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Target Milestone|12.0 |12.2
--- Comment #4 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] 14+ messages in thread
* [Bug fortran/102620] [12/13/14 Regression] ICE in gfc_get_array_span, at fortran/trans-array.c:865 since r12-1233-gd514626ee2566c68
2021-10-05 18:34 [Bug fortran/102620] New: [12 Regression] ICE in gfc_get_array_span, at fortran/trans-array.c:865 gscfq@t-online.de
` (4 preceding siblings ...)
2022-05-06 8:31 ` [Bug fortran/102620] [12/13 " jakub at gcc dot gnu.org
@ 2023-05-08 12:22 ` rguenth at gcc dot gnu.org
2023-08-21 20:58 ` anlauf at gcc dot gnu.org
` (6 subsequent siblings)
12 siblings, 0 replies; 14+ messages in thread
From: rguenth at gcc dot gnu.org @ 2023-05-08 12:22 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=102620
Richard Biener <rguenth at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Target Milestone|12.3 |12.4
--- Comment #6 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] 14+ messages in thread
* [Bug fortran/102620] [12/13/14 Regression] ICE in gfc_get_array_span, at fortran/trans-array.c:865 since r12-1233-gd514626ee2566c68
2021-10-05 18:34 [Bug fortran/102620] New: [12 Regression] ICE in gfc_get_array_span, at fortran/trans-array.c:865 gscfq@t-online.de
` (5 preceding siblings ...)
2023-05-08 12:22 ` [Bug fortran/102620] [12/13/14 " rguenth at gcc dot gnu.org
@ 2023-08-21 20:58 ` anlauf at gcc dot gnu.org
2024-04-02 20:28 ` [Bug fortran/102620] [12 " anlauf at gcc dot gnu.org
` (5 subsequent siblings)
12 siblings, 0 replies; 14+ messages in thread
From: anlauf at gcc dot gnu.org @ 2023-08-21 20:58 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=102620
anlauf at gcc dot gnu.org changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|NEW |WAITING
--- Comment #7 from anlauf at gcc dot gnu.org ---
Apparently fixed on mainline for gcc-14 by r14-2461-gf9182da3213aa5.
^ permalink raw reply [flat|nested] 14+ messages in thread
* [Bug fortran/102620] [12 Regression] ICE in gfc_get_array_span, at fortran/trans-array.c:865 since r12-1233-gd514626ee2566c68
2021-10-05 18:34 [Bug fortran/102620] New: [12 Regression] ICE in gfc_get_array_span, at fortran/trans-array.c:865 gscfq@t-online.de
` (6 preceding siblings ...)
2023-08-21 20:58 ` anlauf at gcc dot gnu.org
@ 2024-04-02 20:28 ` anlauf at gcc dot gnu.org
2024-04-25 6:30 ` pault at gcc dot gnu.org
` (4 subsequent siblings)
12 siblings, 0 replies; 14+ messages in thread
From: anlauf at gcc dot gnu.org @ 2024-04-02 20:28 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=102620
anlauf at gcc dot gnu.org changed:
What |Removed |Added
----------------------------------------------------------------------------
Summary|[12/13 Regression] ICE in |[12 Regression] ICE in
|gfc_get_array_span, at |gfc_get_array_span, at
|fortran/trans-array.c:865 |fortran/trans-array.c:865
|since |since
|r12-1233-gd514626ee2566c68 |r12-1233-gd514626ee2566c68
--- Comment #8 from anlauf at gcc dot gnu.org ---
I get the same behavior at r13-8559 as 14-mainline. There seems to be
another commit that fixed it independently.
Removing 13-branch from the regression list.
^ permalink raw reply [flat|nested] 14+ messages in thread
* [Bug fortran/102620] [12 Regression] ICE in gfc_get_array_span, at fortran/trans-array.c:865 since r12-1233-gd514626ee2566c68
2021-10-05 18:34 [Bug fortran/102620] New: [12 Regression] ICE in gfc_get_array_span, at fortran/trans-array.c:865 gscfq@t-online.de
` (7 preceding siblings ...)
2024-04-02 20:28 ` [Bug fortran/102620] [12 " anlauf at gcc dot gnu.org
@ 2024-04-25 6:30 ` pault at gcc dot gnu.org
2024-04-25 18:32 ` anlauf at gcc dot gnu.org
` (3 subsequent siblings)
12 siblings, 0 replies; 14+ messages in thread
From: pault at gcc dot gnu.org @ 2024-04-25 6:30 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=102620
Paul Thomas <pault at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |pault at gcc dot gnu.org
--- Comment #9 from Paul Thomas <pault at gcc dot gnu.org> ---
(In reply to anlauf from comment #8)
> I get the same behavior at r13-8559 as 14-mainline. There seems to be
> another commit that fixed it independently.
>
> Removing 13-branch from the regression list.
Mark as fixed or backport fixes?
Cheers
Paul
^ permalink raw reply [flat|nested] 14+ messages in thread
* [Bug fortran/102620] [12 Regression] ICE in gfc_get_array_span, at fortran/trans-array.c:865 since r12-1233-gd514626ee2566c68
2021-10-05 18:34 [Bug fortran/102620] New: [12 Regression] ICE in gfc_get_array_span, at fortran/trans-array.c:865 gscfq@t-online.de
` (8 preceding siblings ...)
2024-04-25 6:30 ` pault at gcc dot gnu.org
@ 2024-04-25 18:32 ` anlauf at gcc dot gnu.org
2024-04-26 5:24 ` pault at gcc dot gnu.org
` (2 subsequent siblings)
12 siblings, 0 replies; 14+ messages in thread
From: anlauf at gcc dot gnu.org @ 2024-04-25 18:32 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=102620
--- Comment #10 from anlauf at gcc dot gnu.org ---
(In reply to Paul Thomas from comment #9)
> (In reply to anlauf from comment #8)
> > I get the same behavior at r13-8559 as 14-mainline. There seems to be
> > another commit that fixed it independently.
> >
> > Removing 13-branch from the regression list.
>
> Mark as fixed or backport fixes?
Either I did something wrong, or the bug reappeared on 13-branch...
Anyway, I tried backporting Andre's patch to 13- and 12-branch.
Works fine and regtests fine.
How to proceed?
I can push those changes, so that we are finally done with this PR.
^ permalink raw reply [flat|nested] 14+ messages in thread
* [Bug fortran/102620] [12 Regression] ICE in gfc_get_array_span, at fortran/trans-array.c:865 since r12-1233-gd514626ee2566c68
2021-10-05 18:34 [Bug fortran/102620] New: [12 Regression] ICE in gfc_get_array_span, at fortran/trans-array.c:865 gscfq@t-online.de
` (9 preceding siblings ...)
2024-04-25 18:32 ` anlauf at gcc dot gnu.org
@ 2024-04-26 5:24 ` pault at gcc dot gnu.org
2024-04-26 18:36 ` anlauf at gcc dot gnu.org
2024-04-26 19:24 ` anlauf at gcc dot gnu.org
12 siblings, 0 replies; 14+ messages in thread
From: pault at gcc dot gnu.org @ 2024-04-26 5:24 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=102620
--- Comment #11 from Paul Thomas <pault at gcc dot gnu.org> ---
(In reply to anlauf from comment #10)
> (In reply to Paul Thomas from comment #9)
> > (In reply to anlauf from comment #8)
> > > I get the same behavior at r13-8559 as 14-mainline. There seems to be
> > > another commit that fixed it independently.
> > >
> > > Removing 13-branch from the regression list.
> >
> > Mark as fixed or backport fixes?
>
> Either I did something wrong, or the bug reappeared on 13-branch...
>
> Anyway, I tried backporting Andre's patch to 13- and 12-branch.
> Works fine and regtests fine.
>
> How to proceed?
>
> I can push those changes, so that we are finally done with this PR.
Hi Harald,
It would be splendid if you would backport the patch. In the last week or so, I
have built up quite a list of backports to do, which I will attend to over the
weekend.
We are down from 105 regressions on 26th March to 94 now, of which 13 are now
fixed on mainline. Since there are still some P1 regressions, I have been
prowling around looking for more low hanging edibles while there is still time.
Regards
Paul
^ permalink raw reply [flat|nested] 14+ messages in thread
* [Bug fortran/102620] [12 Regression] ICE in gfc_get_array_span, at fortran/trans-array.c:865 since r12-1233-gd514626ee2566c68
2021-10-05 18:34 [Bug fortran/102620] New: [12 Regression] ICE in gfc_get_array_span, at fortran/trans-array.c:865 gscfq@t-online.de
` (10 preceding siblings ...)
2024-04-26 5:24 ` pault at gcc dot gnu.org
@ 2024-04-26 18:36 ` anlauf at gcc dot gnu.org
2024-04-26 19:24 ` anlauf at gcc dot gnu.org
12 siblings, 0 replies; 14+ messages in thread
From: anlauf at gcc dot gnu.org @ 2024-04-26 18:36 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=102620
--- Comment #12 from anlauf at gcc dot gnu.org ---
(In reply to Paul Thomas from comment #11)
> It would be splendid if you would backport the patch. In the last week or
> so, I have built up quite a list of backports to do, which I will attend to
> over the weekend.
Hi Paul,
I've checked and found that your r14-1082-g842a432b022383 also needs to
be backported to get all testcases here fixed on 12-branch.
When regtesting completes successfully, I will push it.
^ permalink raw reply [flat|nested] 14+ messages in thread
* [Bug fortran/102620] [12 Regression] ICE in gfc_get_array_span, at fortran/trans-array.c:865 since r12-1233-gd514626ee2566c68
2021-10-05 18:34 [Bug fortran/102620] New: [12 Regression] ICE in gfc_get_array_span, at fortran/trans-array.c:865 gscfq@t-online.de
` (11 preceding siblings ...)
2024-04-26 18:36 ` anlauf at gcc dot gnu.org
@ 2024-04-26 19:24 ` anlauf at gcc dot gnu.org
12 siblings, 0 replies; 14+ messages in thread
From: anlauf at gcc dot gnu.org @ 2024-04-26 19:24 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=102620
anlauf at gcc dot gnu.org changed:
What |Removed |Added
----------------------------------------------------------------------------
Resolution|--- |FIXED
Status|WAITING |RESOLVED
--- Comment #13 from anlauf at gcc dot gnu.org ---
Also fixed on 12-branch:
commit r12-10398-gb482968801158116dd8ba3b15a4c29143b2a423a
Author: Paul Thomas <pault@gcc.gnu.org>
Date: Tue May 23 06:46:37 2023 +0100
Fortran: Fix assumed length chars and len inquiry [PR103716]
2023-05-23 Paul Thomas <pault@gcc.gnu.org>
gcc/fortran
PR fortran/103716
* resolve.cc (gfc_resolve_ref): Conversion of array_ref into an
element should be done for all characters without a len expr,
not just deferred lens, and for integer expressions.
* trans-expr.cc (conv_inquiry): For len and kind inquiry refs,
set the se string_length to NULL_TREE.
gcc/testsuite/
PR fortran/103716
* gfortran.dg/pr103716.f90 : New test.
(cherry picked from commit 842a432b02238361ecc601d301ac400a7f30f4fa)
The ICE is gone. A remaining accepts-invalid on 11-branch could be fixed
by backporting the above if needed.
Thanks for the report to Gerhard, and to Paul for the above patch. Closing.
^ permalink raw reply [flat|nested] 14+ messages in thread