public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug fortran/66193] New: ICE for initialisation of some non-zero-sized arrays
@ 2015-05-18 14:34 gerhard.steinmetz.fortran@t-online.de
2015-05-18 14:36 ` [Bug fortran/66193] " gerhard.steinmetz.fortran@t-online.de
` (19 more replies)
0 siblings, 20 replies; 21+ messages in thread
From: gerhard.steinmetz.fortran@t-online.de @ 2015-05-18 14:34 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=66193
Bug ID: 66193
Summary: ICE for initialisation of some non-zero-sized arrays
Product: gcc
Version: 5.1.1
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: fortran
Assignee: unassigned at gcc dot gnu.org
Reporter: gerhard.steinmetz.fortran@t-online.de
Target Milestone: ---
This initialisation of an array (NOT zero sized, NOT a parameter)
program p
real :: z(2)
z = 1 + [real :: 1, 2]
end
yields (with gfortran 5.1.1 on SUSE Linux 13.2, 64 bit)
f951: internal compiler error: Segmentation fault
This variation ...
program p
real :: z(2) = 1 + [real :: 1, 2]
end
or with an additional parameter attribute ...
program p
real, parameter :: z(2) = 1 + [real :: 1, 2]
end
yields the same error message as above.
Kind regards.
^ permalink raw reply [flat|nested] 21+ messages in thread
* [Bug fortran/66193] ICE for initialisation of some non-zero-sized arrays
2015-05-18 14:34 [Bug fortran/66193] New: ICE for initialisation of some non-zero-sized arrays gerhard.steinmetz.fortran@t-online.de
@ 2015-05-18 14:36 ` gerhard.steinmetz.fortran@t-online.de
2015-05-18 15:10 ` tkoenig at gcc dot gnu.org
` (18 subsequent siblings)
19 siblings, 0 replies; 21+ messages in thread
From: gerhard.steinmetz.fortran@t-online.de @ 2015-05-18 14:36 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=66193
--- Comment #1 from Gerhard Steinmetz <gerhard.steinmetz.fortran@t-online.de> ---
For integer instead of real ...
program p
integer :: z(2)
z = 1.2 + [integer :: 3.5, 4.5]
print *, z
end
it compiles with gfortran snippet.f90
but running ./a.out prints an unexpected
1 1
---
On the other hand, something like this with a zero-sized array ...
program p
integer(8) :: z(2)
z = 1 + [ integer(8) :: [ integer(4) :: ], 1, 2 ]
end
gives an ...
f951: internal compiler error: Segmentation fault
^ permalink raw reply [flat|nested] 21+ messages in thread
* [Bug fortran/66193] ICE for initialisation of some non-zero-sized arrays
2015-05-18 14:34 [Bug fortran/66193] New: ICE for initialisation of some non-zero-sized arrays gerhard.steinmetz.fortran@t-online.de
2015-05-18 14:36 ` [Bug fortran/66193] " gerhard.steinmetz.fortran@t-online.de
@ 2015-05-18 15:10 ` tkoenig at gcc dot gnu.org
2015-05-18 17:25 ` gerhard.steinmetz.fortran@t-online.de
` (17 subsequent siblings)
19 siblings, 0 replies; 21+ messages in thread
From: tkoenig at gcc dot gnu.org @ 2015-05-18 15:10 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=66193
Thomas Koenig <tkoenig at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |tkoenig at gcc dot gnu.org
--- Comment #2 from Thomas Koenig <tkoenig at gcc dot gnu.org> ---
Do you compile these test cases with -O? What happens if you specify
-fno-frontend-optimize ?
^ permalink raw reply [flat|nested] 21+ messages in thread
* [Bug fortran/66193] ICE for initialisation of some non-zero-sized arrays
2015-05-18 14:34 [Bug fortran/66193] New: ICE for initialisation of some non-zero-sized arrays gerhard.steinmetz.fortran@t-online.de
2015-05-18 14:36 ` [Bug fortran/66193] " gerhard.steinmetz.fortran@t-online.de
2015-05-18 15:10 ` tkoenig at gcc dot gnu.org
@ 2015-05-18 17:25 ` gerhard.steinmetz.fortran@t-online.de
2015-05-18 17:58 ` kargl at gcc dot gnu.org
` (16 subsequent siblings)
19 siblings, 0 replies; 21+ messages in thread
From: gerhard.steinmetz.fortran@t-online.de @ 2015-05-18 17:25 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=66193
--- Comment #3 from Gerhard Steinmetz <gerhard.steinmetz.fortran@t-online.de> ---
Hmm, no observable difference with option -fno-frontend-optimize, sorry.
Of course I probed some combinations for several options.
One example for a more extensive "debug" run :
gfortran \
-O0 -g -msse3 \
-fno-omit-frame-pointer \
-fdefault-real-8 \
-fno-align-commons \
-std=f2008 \
-pedantic \
-fcheck=all \
-fbacktrace \
-ftrapv \
-ffpe-trap=invalid,zero,overflow \
-fstack-protector \
-fstack-protector-all \
\
-Wall \
-Wextra \
-Wsurprising \
-Warray-bounds \
-Warray-temporaries \
-Wcharacter-truncation \
-Wconversion-extra \
-Wfunction-elimination \
-Wrealloc-lhs \
-Wrealloc-lhs-all \
-Wtabs \
-Wunderflow \
-Wunused-dummy-argument \
\
# ... some more
# ... with and without -c
^ permalink raw reply [flat|nested] 21+ messages in thread
* [Bug fortran/66193] ICE for initialisation of some non-zero-sized arrays
2015-05-18 14:34 [Bug fortran/66193] New: ICE for initialisation of some non-zero-sized arrays gerhard.steinmetz.fortran@t-online.de
` (2 preceding siblings ...)
2015-05-18 17:25 ` gerhard.steinmetz.fortran@t-online.de
@ 2015-05-18 17:58 ` kargl at gcc dot gnu.org
2015-05-19 18:24 ` tkoenig at gcc dot gnu.org
` (15 subsequent siblings)
19 siblings, 0 replies; 21+ messages in thread
From: kargl at gcc dot gnu.org @ 2015-05-18 17:58 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=66193
kargl at gcc dot gnu.org changed:
What |Removed |Added
----------------------------------------------------------------------------
Priority|P3 |P4
CC| |kargl at gcc dot gnu.org
--- Comment #4 from kargl at gcc dot gnu.org ---
Confirmed. Here's a slightly expanded testcase where it
shows that the first 2 lines are failing.
program p
real :: z(2)
z = 1 + [real :: 1, 2] ! fails
z = 1. + [real :: 1, 2] ! fails
z = 1. + [1, 2] ! OK
z = 1. + [real :: 1., 2.] ! OK
z = 1. + [real :: 1.d0, 2.d0] ! OK
z = 1 + [1, 2] ! OK
z = 1 + [real :: 1., 2.] ! OK
z = 1 + [real :: 1.d0, 2.d0] ! OK
z = [1, 2] + 1 ! OK
z = [real :: 1., 2.] + 1 ! OK
z = [real :: 1.d0, 2.d0] + 1 ! OK
z = [1, 2] + 1. ! OK
z = [real :: 1., 2.] + 1. ! OK
z = [real :: 1.d0, 2.d0] + 1. ! OK
print *, z
end
^ permalink raw reply [flat|nested] 21+ messages in thread
* [Bug fortran/66193] ICE for initialisation of some non-zero-sized arrays
2015-05-18 14:34 [Bug fortran/66193] New: ICE for initialisation of some non-zero-sized arrays gerhard.steinmetz.fortran@t-online.de
` (3 preceding siblings ...)
2015-05-18 17:58 ` kargl at gcc dot gnu.org
@ 2015-05-19 18:24 ` tkoenig at gcc dot gnu.org
2015-05-19 18:31 ` tkoenig at gcc dot gnu.org
` (14 subsequent siblings)
19 siblings, 0 replies; 21+ messages in thread
From: tkoenig at gcc dot gnu.org @ 2015-05-19 18:24 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=66193
Thomas Koenig <tkoenig at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|UNCONFIRMED |NEW
Last reconfirmed| |2015-05-19
Ever confirmed|0 |1
--- Comment #5 from Thomas Koenig <tkoenig at gcc dot gnu.org> ---
This does not fail:
ig25@linux-fd1f:~/Krempel/Constructor> cat gar.f90
program p
real :: z(2)
z = [real :: 1, 2] + 1
print *,z
end
ig25@linux-fd1f:~/Krempel/Constructor> gfortran gar.f90
ig25@linux-fd1f:~/Krempel/Constructor> ./a.out
1.00000000 2.00000000
^ permalink raw reply [flat|nested] 21+ messages in thread
* [Bug fortran/66193] ICE for initialisation of some non-zero-sized arrays
2015-05-18 14:34 [Bug fortran/66193] New: ICE for initialisation of some non-zero-sized arrays gerhard.steinmetz.fortran@t-online.de
` (4 preceding siblings ...)
2015-05-19 18:24 ` tkoenig at gcc dot gnu.org
@ 2015-05-19 18:31 ` tkoenig at gcc dot gnu.org
2015-05-19 20:03 ` sgk at troutmask dot apl.washington.edu
` (13 subsequent siblings)
19 siblings, 0 replies; 21+ messages in thread
From: tkoenig at gcc dot gnu.org @ 2015-05-19 18:31 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=66193
--- Comment #6 from Thomas Koenig <tkoenig at gcc dot gnu.org> ---
The problem manifests itself in reduce_binary_ca. This function gets handed an
array constructor of type real whose elements are integer. This makes no
sense.
(gdb) p *op1
$6 = {expr_type = EXPR_CONSTANT, ts = {type = BT_REAL, kind = 4,
...
(gdb) p *op2
$7 = {expr_type = EXPR_ARRAY, ts = {type = BT_REAL, kind = 4, u = {derived =
0x0, cl = 0x0, pad = 0},
...
(gdb) p *(c->expr)
$9 = {expr_type = EXPR_CONSTANT, ts = {type = BT_INTEGER, kind = 4, u =
{derived = 0x0, cl = 0x0,
So the real error is somewhere else.
^ permalink raw reply [flat|nested] 21+ messages in thread
* [Bug fortran/66193] ICE for initialisation of some non-zero-sized arrays
2015-05-18 14:34 [Bug fortran/66193] New: ICE for initialisation of some non-zero-sized arrays gerhard.steinmetz.fortran@t-online.de
` (5 preceding siblings ...)
2015-05-19 18:31 ` tkoenig at gcc dot gnu.org
@ 2015-05-19 20:03 ` sgk at troutmask dot apl.washington.edu
2015-05-19 20:14 ` tkoenig at gcc dot gnu.org
` (12 subsequent siblings)
19 siblings, 0 replies; 21+ messages in thread
From: sgk at troutmask dot apl.washington.edu @ 2015-05-19 20:03 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=66193
--- Comment #7 from Steve Kargl <sgk at troutmask dot apl.washington.edu> ---
On Tue, May 19, 2015 at 06:30:57PM +0000, tkoenig at gcc dot gnu.org wrote:
> The problem manifests itself in reduce_binary_ca. This function
> gets handed an array constructor of type real whose elements are
> integer. This makes no sense.
>
> (gdb) p *op1
> $6 = {expr_type = EXPR_CONSTANT, ts = {type = BT_REAL, kind = 4,
> ...
>
> (gdb) p *op2
> $7 = {expr_type = EXPR_ARRAY, ts = {type = BT_REAL, kind = 4, u = {derived =
> 0x0, cl = 0x0, pad = 0},
>
> ...
>
> (gdb) p *(c->expr)
> $9 = {expr_type = EXPR_CONSTANT, ts = {type = BT_INTEGER, kind = 4, u =
> {derived = 0x0, cl = 0x0,
>
> So the real error is somewhere else.
>
I suspect that we are missing an explicit type conversion step.
In array.c(gfc_match_array_constructor), we have code starting
at line 1141
/* Size must be calculated at resolution time. */
if (seen_ts)
{
expr = gfc_get_array_expr (ts.type, ts.kind, &where);
expr->ts = ts;
}
else
expr = gfc_get_array_expr (BT_UNKNOWN, 0, &where);
I wonder if we should walk the array and do a conversion after
setting 'expr->ts = ts'.
^ permalink raw reply [flat|nested] 21+ messages in thread
* [Bug fortran/66193] ICE for initialisation of some non-zero-sized arrays
2015-05-18 14:34 [Bug fortran/66193] New: ICE for initialisation of some non-zero-sized arrays gerhard.steinmetz.fortran@t-online.de
` (6 preceding siblings ...)
2015-05-19 20:03 ` sgk at troutmask dot apl.washington.edu
@ 2015-05-19 20:14 ` tkoenig at gcc dot gnu.org
2015-05-19 20:37 ` tkoenig at gcc dot gnu.org
` (11 subsequent siblings)
19 siblings, 0 replies; 21+ messages in thread
From: tkoenig at gcc dot gnu.org @ 2015-05-19 20:14 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=66193
--- Comment #8 from Thomas Koenig <tkoenig at gcc dot gnu.org> ---
This patch looks good:
--- arith.c (Revision 223202)
+++ arith.c (Arbeitskopie)
@@ -1390,6 +1390,12 @@ reduce_binary (arith (*eval) (gfc_expr *, gfc_expr
if (op1->expr_type == EXPR_CONSTANT && op2->expr_type == EXPR_CONSTANT)
return eval (op1, op2, result);
+ if (op1->expr_type == EXPR_ARRAY)
+ gfc_check_constructor_type (op1);
+
+ if (op2->expr_type == EXPR_ARRAY)
+ gfc_check_constructor_type (op2);
+
if (op1->expr_type == EXPR_CONSTANT && op2->expr_type == EXPR_ARRAY)
return reduce_binary_ca (eval, op1, op2, result);
^ permalink raw reply [flat|nested] 21+ messages in thread
* [Bug fortran/66193] ICE for initialisation of some non-zero-sized arrays
2015-05-18 14:34 [Bug fortran/66193] New: ICE for initialisation of some non-zero-sized arrays gerhard.steinmetz.fortran@t-online.de
` (7 preceding siblings ...)
2015-05-19 20:14 ` tkoenig at gcc dot gnu.org
@ 2015-05-19 20:37 ` tkoenig at gcc dot gnu.org
2015-05-20 9:00 ` gerhard.steinmetz.fortran@t-online.de
` (10 subsequent siblings)
19 siblings, 0 replies; 21+ messages in thread
From: tkoenig at gcc dot gnu.org @ 2015-05-19 20:37 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=66193
--- Comment #9 from Thomas Koenig <tkoenig at gcc dot gnu.org> ---
(In reply to Thomas Koenig from comment #8)
> This patch looks good:
but fixes only the ICE, not the wrong-code issue in comment#1.
^ permalink raw reply [flat|nested] 21+ messages in thread
* [Bug fortran/66193] ICE for initialisation of some non-zero-sized arrays
2015-05-18 14:34 [Bug fortran/66193] New: ICE for initialisation of some non-zero-sized arrays gerhard.steinmetz.fortran@t-online.de
` (8 preceding siblings ...)
2015-05-19 20:37 ` tkoenig at gcc dot gnu.org
@ 2015-05-20 9:00 ` gerhard.steinmetz.fortran@t-online.de
2015-06-09 14:36 ` gerhard.steinmetz.fortran@t-online.de
` (9 subsequent siblings)
19 siblings, 0 replies; 21+ messages in thread
From: gerhard.steinmetz.fortran@t-online.de @ 2015-05-20 9:00 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=66193
--- Comment #10 from Gerhard Steinmetz <gerhard.steinmetz.fortran@t-online.de> ---
Perhaps it's better to make one factor larger.
Maybe the following will help.
$ cat zz1.f90
program p
real :: z(2)
z = 10 + [real :: 1, 2]
print *, z
end
# you may check your patch
$ cat zz2.f90
program p
real :: z(2)
z = 10. + [real :: 1, 2]
print *, z
end
# you may check your patch
---
$ cat zz3.f90
program p
real :: z(2)
z = [real :: 1, 2] + 10
print *, z
end
$ gfortran zz3.f90
$ a.out
1.00000000 2.00000000
# expected:
11.00000000 12.00000000
$ cat zz4.f90
program p
real :: z(2)
z = [real :: 1, 2] + 10.
print *, z
end
$ gfortran zz4.f90
$ a.out
1.00000000 2.00000000
# expected:
11.00000000 12.00000000
---
Or to use an other basic operation :
$ cat zz5.f90
program p
real :: z(2)
z = -10 * [real :: 1, 2]
print *, z
end
# you may check your patch
$ cat zz6.f90
program p
real :: z(2)
z = -10. * [real :: 1, 2]
print *, z
end
# you may check your patch
^ permalink raw reply [flat|nested] 21+ messages in thread
* [Bug fortran/66193] ICE for initialisation of some non-zero-sized arrays
2015-05-18 14:34 [Bug fortran/66193] New: ICE for initialisation of some non-zero-sized arrays gerhard.steinmetz.fortran@t-online.de
` (9 preceding siblings ...)
2015-05-20 9:00 ` gerhard.steinmetz.fortran@t-online.de
@ 2015-06-09 14:36 ` gerhard.steinmetz.fortran@t-online.de
2015-06-09 14:38 ` gerhard.steinmetz.fortran@t-online.de
` (8 subsequent siblings)
19 siblings, 0 replies; 21+ messages in thread
From: gerhard.steinmetz.fortran@t-online.de @ 2015-06-09 14:36 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=66193
--- Comment #11 from Gerhard Steinmetz <gerhard.steinmetz.fortran@t-online.de> ---
Created attachment 35726
--> https://gcc.gnu.org/bugzilla/attachment.cgi?id=35726&action=edit
test case pr66193_1_real.f90
^ permalink raw reply [flat|nested] 21+ messages in thread
* [Bug fortran/66193] ICE for initialisation of some non-zero-sized arrays
2015-05-18 14:34 [Bug fortran/66193] New: ICE for initialisation of some non-zero-sized arrays gerhard.steinmetz.fortran@t-online.de
` (10 preceding siblings ...)
2015-06-09 14:36 ` gerhard.steinmetz.fortran@t-online.de
@ 2015-06-09 14:38 ` gerhard.steinmetz.fortran@t-online.de
2015-06-09 14:39 ` gerhard.steinmetz.fortran@t-online.de
` (7 subsequent siblings)
19 siblings, 0 replies; 21+ messages in thread
From: gerhard.steinmetz.fortran@t-online.de @ 2015-06-09 14:38 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=66193
--- Comment #12 from Gerhard Steinmetz <gerhard.steinmetz.fortran@t-online.de> ---
Created attachment 35727
--> https://gcc.gnu.org/bugzilla/attachment.cgi?id=35727&action=edit
test case pr66193_2_integer.f90
^ permalink raw reply [flat|nested] 21+ messages in thread
* [Bug fortran/66193] ICE for initialisation of some non-zero-sized arrays
2015-05-18 14:34 [Bug fortran/66193] New: ICE for initialisation of some non-zero-sized arrays gerhard.steinmetz.fortran@t-online.de
` (11 preceding siblings ...)
2015-06-09 14:38 ` gerhard.steinmetz.fortran@t-online.de
@ 2015-06-09 14:39 ` gerhard.steinmetz.fortran@t-online.de
2015-06-09 14:40 ` gerhard.steinmetz.fortran@t-online.de
` (6 subsequent siblings)
19 siblings, 0 replies; 21+ messages in thread
From: gerhard.steinmetz.fortran@t-online.de @ 2015-06-09 14:39 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=66193
--- Comment #13 from Gerhard Steinmetz <gerhard.steinmetz.fortran@t-online.de> ---
Created attachment 35728
--> https://gcc.gnu.org/bugzilla/attachment.cgi?id=35728&action=edit
test case pr66193_3_diverse.f90
^ permalink raw reply [flat|nested] 21+ messages in thread
* [Bug fortran/66193] ICE for initialisation of some non-zero-sized arrays
2015-05-18 14:34 [Bug fortran/66193] New: ICE for initialisation of some non-zero-sized arrays gerhard.steinmetz.fortran@t-online.de
` (12 preceding siblings ...)
2015-06-09 14:39 ` gerhard.steinmetz.fortran@t-online.de
@ 2015-06-09 14:40 ` gerhard.steinmetz.fortran@t-online.de
2015-06-10 16:15 ` gerhard.steinmetz.fortran@t-online.de
` (5 subsequent siblings)
19 siblings, 0 replies; 21+ messages in thread
From: gerhard.steinmetz.fortran@t-online.de @ 2015-06-09 14:40 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=66193
--- Comment #14 from Gerhard Steinmetz <gerhard.steinmetz.fortran@t-online.de> ---
Attached some prepared test files.
Added more test cases for integer and real.
Added new test case for logical :
subroutine s2
logical(8), parameter :: z1(2) = .true. .or. [ logical(8) :: [ logical(4)
:: ], .false., .false. ]
logical(8) :: z2(2) = .true. .or. [ logical(8) :: [ logical(4) :: ],
.false., .false. ]
logical(8) :: z3(2)
z3 = .true. .or. [ logical(8) :: [ logical(4) :: ], .false., .false. ]
if ( (.not. z1(1)) .and. (.not. z1(2)) ) call abort
if ( (.not. z2(1)) .and. (.not. z2(2)) ) call abort
if ( (.not. z3(1)) .and. (.not. z3(2)) ) call abort
end subroutine s2
^ permalink raw reply [flat|nested] 21+ messages in thread
* [Bug fortran/66193] ICE for initialisation of some non-zero-sized arrays
2015-05-18 14:34 [Bug fortran/66193] New: ICE for initialisation of some non-zero-sized arrays gerhard.steinmetz.fortran@t-online.de
` (13 preceding siblings ...)
2015-06-09 14:40 ` gerhard.steinmetz.fortran@t-online.de
@ 2015-06-10 16:15 ` gerhard.steinmetz.fortran@t-online.de
2022-02-03 22:03 ` anlauf at gcc dot gnu.org
` (4 subsequent siblings)
19 siblings, 0 replies; 21+ messages in thread
From: gerhard.steinmetz.fortran@t-online.de @ 2015-06-10 16:15 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=66193
--- Comment #15 from Gerhard Steinmetz <gerhard.steinmetz.fortran@t-online.de> ---
Created attachment 35745
--> https://gcc.gnu.org/bugzilla/attachment.cgi?id=35745&action=edit
test case pr66193_3_diverse_new.f90
Better test, replaces pr66193_3_diverse.f90
^ permalink raw reply [flat|nested] 21+ messages in thread
* [Bug fortran/66193] ICE for initialisation of some non-zero-sized arrays
2015-05-18 14:34 [Bug fortran/66193] New: ICE for initialisation of some non-zero-sized arrays gerhard.steinmetz.fortran@t-online.de
` (14 preceding siblings ...)
2015-06-10 16:15 ` gerhard.steinmetz.fortran@t-online.de
@ 2022-02-03 22:03 ` anlauf at gcc dot gnu.org
2022-02-06 21:14 ` anlauf at gcc dot gnu.org
` (3 subsequent siblings)
19 siblings, 0 replies; 21+ messages in thread
From: anlauf at gcc dot gnu.org @ 2022-02-03 22:03 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=66193
anlauf at gcc dot gnu.org changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |anlauf at gcc dot gnu.org
--- Comment #18 from anlauf at gcc dot gnu.org ---
Created attachment 52346
--> https://gcc.gnu.org/bugzilla/attachment.cgi?id=52346&action=edit
WIP patch
This fixes at least some of the testcase given in this PR and regtests OK.
May need more testing and fine-tuning.
^ permalink raw reply [flat|nested] 21+ messages in thread
* [Bug fortran/66193] ICE for initialisation of some non-zero-sized arrays
2015-05-18 14:34 [Bug fortran/66193] New: ICE for initialisation of some non-zero-sized arrays gerhard.steinmetz.fortran@t-online.de
` (15 preceding siblings ...)
2022-02-03 22:03 ` anlauf at gcc dot gnu.org
@ 2022-02-06 21:14 ` anlauf at gcc dot gnu.org
2022-02-09 21:16 ` cvs-commit at gcc dot gnu.org
` (2 subsequent siblings)
19 siblings, 0 replies; 21+ messages in thread
From: anlauf at gcc dot gnu.org @ 2022-02-06 21:14 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=66193
anlauf at gcc dot gnu.org changed:
What |Removed |Added
----------------------------------------------------------------------------
Assignee|unassigned at gcc dot gnu.org |anlauf at gcc dot gnu.org
Status|NEW |ASSIGNED
--- Comment #19 from anlauf at gcc dot gnu.org ---
Submitted: https://gcc.gnu.org/pipermail/fortran/2022-February/057520.html
^ permalink raw reply [flat|nested] 21+ messages in thread
* [Bug fortran/66193] ICE for initialisation of some non-zero-sized arrays
2015-05-18 14:34 [Bug fortran/66193] New: ICE for initialisation of some non-zero-sized arrays gerhard.steinmetz.fortran@t-online.de
` (16 preceding siblings ...)
2022-02-06 21:14 ` anlauf at gcc dot gnu.org
@ 2022-02-09 21:16 ` cvs-commit at gcc dot gnu.org
2022-02-20 19:27 ` cvs-commit at gcc dot gnu.org
2022-02-20 19:29 ` anlauf at gcc dot gnu.org
19 siblings, 0 replies; 21+ messages in thread
From: cvs-commit at gcc dot gnu.org @ 2022-02-09 21:16 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=66193
--- Comment #20 from CVS Commits <cvs-commit at gcc dot gnu.org> ---
The master branch has been updated by Harald Anlauf <anlauf@gcc.gnu.org>:
https://gcc.gnu.org/g:f3ffea93ef31c03ad8cdcb54e71ec868b57b264f
commit r12-7153-gf3ffea93ef31c03ad8cdcb54e71ec868b57b264f
Author: Harald Anlauf <anlauf@gmx.de>
Date: Sun Feb 6 21:47:20 2022 +0100
Fortran: try simplifications during reductions of array constructors
gcc/fortran/ChangeLog:
PR fortran/66193
* arith.cc (reduce_binary_ac): When reducing binary expressions,
try simplification. Handle case of empty constructor.
(reduce_binary_ca): Likewise.
gcc/testsuite/ChangeLog:
PR fortran/66193
* gfortran.dg/array_constructor_55.f90: New test.
^ permalink raw reply [flat|nested] 21+ messages in thread
* [Bug fortran/66193] ICE for initialisation of some non-zero-sized arrays
2015-05-18 14:34 [Bug fortran/66193] New: ICE for initialisation of some non-zero-sized arrays gerhard.steinmetz.fortran@t-online.de
` (17 preceding siblings ...)
2022-02-09 21:16 ` cvs-commit at gcc dot gnu.org
@ 2022-02-20 19:27 ` cvs-commit at gcc dot gnu.org
2022-02-20 19:29 ` anlauf at gcc dot gnu.org
19 siblings, 0 replies; 21+ messages in thread
From: cvs-commit at gcc dot gnu.org @ 2022-02-20 19:27 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=66193
--- Comment #21 from CVS Commits <cvs-commit at gcc dot gnu.org> ---
The releases/gcc-11 branch has been updated by Harald Anlauf
<anlauf@gcc.gnu.org>:
https://gcc.gnu.org/g:a5088b07e0a547cdacaa6db8ad762fd8c425b1f0
commit r11-9613-ga5088b07e0a547cdacaa6db8ad762fd8c425b1f0
Author: Harald Anlauf <anlauf@gmx.de>
Date: Sun Feb 6 21:47:20 2022 +0100
Fortran: try simplifications during reductions of array constructors
gcc/fortran/ChangeLog:
PR fortran/66193
* arith.c (reduce_binary_ac): When reducing binary expressions,
try simplification. Handle case of empty constructor.
(reduce_binary_ca): Likewise.
gcc/testsuite/ChangeLog:
PR fortran/66193
* gfortran.dg/array_constructor_55.f90: New test.
(cherry picked from commit f3ffea93ef31c03ad8cdcb54e71ec868b57b264f)
^ permalink raw reply [flat|nested] 21+ messages in thread
* [Bug fortran/66193] ICE for initialisation of some non-zero-sized arrays
2015-05-18 14:34 [Bug fortran/66193] New: ICE for initialisation of some non-zero-sized arrays gerhard.steinmetz.fortran@t-online.de
` (18 preceding siblings ...)
2022-02-20 19:27 ` cvs-commit at gcc dot gnu.org
@ 2022-02-20 19:29 ` anlauf at gcc dot gnu.org
19 siblings, 0 replies; 21+ messages in thread
From: anlauf at gcc dot gnu.org @ 2022-02-20 19:29 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=66193
anlauf at gcc dot gnu.org changed:
What |Removed |Added
----------------------------------------------------------------------------
Target Milestone|--- |11.3
Status|ASSIGNED |RESOLVED
Resolution|--- |FIXED
--- Comment #22 from anlauf at gcc dot gnu.org ---
Fixed on mainline for gcc-12, and on 11-branch. Closing.
Thanks for the report!
^ permalink raw reply [flat|nested] 21+ messages in thread
end of thread, other threads:[~2022-02-20 19:29 UTC | newest]
Thread overview: 21+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-05-18 14:34 [Bug fortran/66193] New: ICE for initialisation of some non-zero-sized arrays gerhard.steinmetz.fortran@t-online.de
2015-05-18 14:36 ` [Bug fortran/66193] " gerhard.steinmetz.fortran@t-online.de
2015-05-18 15:10 ` tkoenig at gcc dot gnu.org
2015-05-18 17:25 ` gerhard.steinmetz.fortran@t-online.de
2015-05-18 17:58 ` kargl at gcc dot gnu.org
2015-05-19 18:24 ` tkoenig at gcc dot gnu.org
2015-05-19 18:31 ` tkoenig at gcc dot gnu.org
2015-05-19 20:03 ` sgk at troutmask dot apl.washington.edu
2015-05-19 20:14 ` tkoenig at gcc dot gnu.org
2015-05-19 20:37 ` tkoenig at gcc dot gnu.org
2015-05-20 9:00 ` gerhard.steinmetz.fortran@t-online.de
2015-06-09 14:36 ` gerhard.steinmetz.fortran@t-online.de
2015-06-09 14:38 ` gerhard.steinmetz.fortran@t-online.de
2015-06-09 14:39 ` gerhard.steinmetz.fortran@t-online.de
2015-06-09 14:40 ` gerhard.steinmetz.fortran@t-online.de
2015-06-10 16:15 ` gerhard.steinmetz.fortran@t-online.de
2022-02-03 22:03 ` anlauf at gcc dot gnu.org
2022-02-06 21:14 ` anlauf at gcc dot gnu.org
2022-02-09 21:16 ` cvs-commit at gcc dot gnu.org
2022-02-20 19:27 ` cvs-commit at gcc dot gnu.org
2022-02-20 19:29 ` anlauf at gcc dot gnu.org
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).