public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug fortran/108010] New: ICE in reduce_unary, at fortran/arith.cc:1345
@ 2022-12-07 16:41 gscfq@t-online.de
2022-12-07 19:40 ` [Bug fortran/108010] " anlauf at gcc dot gnu.org
` (5 more replies)
0 siblings, 6 replies; 7+ messages in thread
From: gscfq@t-online.de @ 2022-12-07 16:41 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=108010
Bug ID: 108010
Summary: ICE in reduce_unary, at fortran/arith.cc:1345
Product: gcc
Version: 13.0
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: fortran
Assignee: unassigned at gcc dot gnu.org
Reporter: gscfq@t-online.de
Target Milestone: ---
Affects versions down to at least r5 :
$ cat z1.f90
program p
print *, -[real :: [real ::], 2]
end
$ cat z2.f90
program p
print *, +[integer :: [real ::], 2]
print *, -[integer :: [real ::], 2]
print *, 1 + [integer :: [real ::], 2]
print *, 1 - [integer :: [real ::], 2]
print *, 2 * [integer :: [real ::], 2]
print *, +[integer :: [real ::]]
print *, -[integer :: [real ::]]
print *, 1 + [integer :: [real ::]]
print *, 1 - [integer :: [real ::]]
print *, 2 * [integer :: [real ::]]
end
$ cat z3.f90
program p
print *, [integer :: [real ::]] + [integer :: [real ::]]
print *, [integer :: [real ::]] - [integer :: [real ::]]
print *, [integer :: [real ::]] * [integer :: [real ::]]
print *, [integer :: [real ::], 2] + [real :: [real ::], 3]
print *, [integer :: [real ::], 2] - [real :: [real ::], 3]
print *, [integer :: [real ::], 2] * [real :: [real ::], 3]
end
$ cat z0.f90
program p
print *, [integer :: [integer ::], 2]
print *, [real :: [real ::], 2]
end
$ gfortran-13-20221204 z0.f90 && ./a.out
2
2.00000000
$ gfortran-13-20221204 -c z1.f90
f951: internal compiler error: Segmentation fault
0xf488bf crash_signal
../../gcc/toplev.cc:314
0x7d7ebd reduce_unary
../../gcc/fortran/arith.cc:1345
0x7d7e91 reduce_unary
../../gcc/fortran/arith.cc:1332
0x7d8638 eval_intrinsic
../../gcc/fortran/arith.cc:1706
0x84baa4 match_level_2
../../gcc/fortran/matchexp.cc:490
0x84bac2 match_level_3
../../gcc/fortran/matchexp.cc:551
0x84bbb4 match_level_4
../../gcc/fortran/matchexp.cc:599
0x84bbb4 match_and_operand
../../gcc/fortran/matchexp.cc:693
0x84bda2 match_or_operand
../../gcc/fortran/matchexp.cc:722
0x84be72 match_equiv_operand
../../gcc/fortran/matchexp.cc:765
0x84bf44 match_level_5
../../gcc/fortran/matchexp.cc:811
0x84b311 gfc_match_expr(gfc_expr**)
../../gcc/fortran/matchexp.cc:870
0x832a09 match_io_element
../../gcc/fortran/io.cc:3668
0x83533a match_io_list
../../gcc/fortran/io.cc:3716
0x83573e match_io
../../gcc/fortran/io.cc:4394
0x83923a gfc_match_print()
../../gcc/fortran/io.cc:4450
0x86b501 match_word
../../gcc/fortran/parse.cc:67
0x871163 decode_statement
../../gcc/fortran/parse.cc:539
0x87159a next_free
../../gcc/fortran/parse.cc:1403
0x87159a next_statement
../../gcc/fortran/parse.cc:1635
^ permalink raw reply [flat|nested] 7+ messages in thread
* [Bug fortran/108010] ICE in reduce_unary, at fortran/arith.cc:1345
2022-12-07 16:41 [Bug fortran/108010] New: ICE in reduce_unary, at fortran/arith.cc:1345 gscfq@t-online.de
@ 2022-12-07 19:40 ` anlauf at gcc dot gnu.org
2022-12-07 19:40 ` anlauf at gcc dot gnu.org
` (4 subsequent siblings)
5 siblings, 0 replies; 7+ messages in thread
From: anlauf at gcc dot gnu.org @ 2022-12-07 19:40 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=108010
anlauf at gcc dot gnu.org changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |anlauf at gcc dot gnu.org
--- Comment #1 from anlauf at gcc dot gnu.org ---
Created attachment 54038
--> https://gcc.gnu.org/bugzilla/attachment.cgi?id=54038&action=edit
Tentative patch
We need to catch zero-sized array ctors.
^ permalink raw reply [flat|nested] 7+ messages in thread
* [Bug fortran/108010] ICE in reduce_unary, at fortran/arith.cc:1345
2022-12-07 16:41 [Bug fortran/108010] New: ICE in reduce_unary, at fortran/arith.cc:1345 gscfq@t-online.de
2022-12-07 19:40 ` [Bug fortran/108010] " anlauf at gcc dot gnu.org
@ 2022-12-07 19:40 ` anlauf at gcc dot gnu.org
2022-12-07 20:58 ` anlauf at gcc dot gnu.org
` (3 subsequent siblings)
5 siblings, 0 replies; 7+ messages in thread
From: anlauf at gcc dot gnu.org @ 2022-12-07 19:40 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=108010
anlauf at gcc dot gnu.org changed:
What |Removed |Added
----------------------------------------------------------------------------
Last reconfirmed| |2022-12-07
Ever confirmed|0 |1
Assignee|unassigned at gcc dot gnu.org |anlauf at gcc dot gnu.org
Status|UNCONFIRMED |ASSIGNED
--- Comment #2 from anlauf at gcc dot gnu.org ---
Taking.
^ permalink raw reply [flat|nested] 7+ messages in thread
* [Bug fortran/108010] ICE in reduce_unary, at fortran/arith.cc:1345
2022-12-07 16:41 [Bug fortran/108010] New: ICE in reduce_unary, at fortran/arith.cc:1345 gscfq@t-online.de
2022-12-07 19:40 ` [Bug fortran/108010] " anlauf at gcc dot gnu.org
2022-12-07 19:40 ` anlauf at gcc dot gnu.org
@ 2022-12-07 20:58 ` anlauf at gcc dot gnu.org
2022-12-07 22:09 ` cvs-commit at gcc dot gnu.org
` (2 subsequent siblings)
5 siblings, 0 replies; 7+ messages in thread
From: anlauf at gcc dot gnu.org @ 2022-12-07 20:58 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=108010
--- Comment #3 from anlauf at gcc dot gnu.org ---
Submitted: https://gcc.gnu.org/pipermail/fortran/2022-December/058586.html
^ permalink raw reply [flat|nested] 7+ messages in thread
* [Bug fortran/108010] ICE in reduce_unary, at fortran/arith.cc:1345
2022-12-07 16:41 [Bug fortran/108010] New: ICE in reduce_unary, at fortran/arith.cc:1345 gscfq@t-online.de
` (2 preceding siblings ...)
2022-12-07 20:58 ` anlauf at gcc dot gnu.org
@ 2022-12-07 22:09 ` cvs-commit at gcc dot gnu.org
2022-12-07 22:11 ` anlauf at gcc dot gnu.org
2023-04-23 18:53 ` cvs-commit at gcc dot gnu.org
5 siblings, 0 replies; 7+ messages in thread
From: cvs-commit at gcc dot gnu.org @ 2022-12-07 22:09 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=108010
--- Comment #4 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:7d6512d102a5a4fb3939de95bce38d154512a19f
commit r13-4545-g7d6512d102a5a4fb3939de95bce38d154512a19f
Author: Harald Anlauf <anlauf@gmx.de>
Date: Wed Dec 7 21:50:23 2022 +0100
Fortran: handle zero-sized arrays in ctors with typespec [PR108010]
gcc/fortran/ChangeLog:
PR fortran/108010
* arith.cc (reduce_unary): Handle zero-sized arrays.
(reduce_binary_aa): Likewise.
gcc/testsuite/ChangeLog:
PR fortran/108010
* gfortran.dg/pr108010.f90: New test.
^ permalink raw reply [flat|nested] 7+ messages in thread
* [Bug fortran/108010] ICE in reduce_unary, at fortran/arith.cc:1345
2022-12-07 16:41 [Bug fortran/108010] New: ICE in reduce_unary, at fortran/arith.cc:1345 gscfq@t-online.de
` (3 preceding siblings ...)
2022-12-07 22:09 ` cvs-commit at gcc dot gnu.org
@ 2022-12-07 22:11 ` anlauf at gcc dot gnu.org
2023-04-23 18:53 ` cvs-commit at gcc dot gnu.org
5 siblings, 0 replies; 7+ messages in thread
From: anlauf at gcc dot gnu.org @ 2022-12-07 22:11 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=108010
anlauf at gcc dot gnu.org changed:
What |Removed |Added
----------------------------------------------------------------------------
Target Milestone|--- |13.0
Resolution|--- |FIXED
Status|ASSIGNED |RESOLVED
--- Comment #5 from anlauf at gcc dot gnu.org ---
Fixed on mainline for gcc-13. Closing.
Thanks for the report!
^ permalink raw reply [flat|nested] 7+ messages in thread
* [Bug fortran/108010] ICE in reduce_unary, at fortran/arith.cc:1345
2022-12-07 16:41 [Bug fortran/108010] New: ICE in reduce_unary, at fortran/arith.cc:1345 gscfq@t-online.de
` (4 preceding siblings ...)
2022-12-07 22:11 ` anlauf at gcc dot gnu.org
@ 2023-04-23 18:53 ` cvs-commit at gcc dot gnu.org
5 siblings, 0 replies; 7+ messages in thread
From: cvs-commit at gcc dot gnu.org @ 2023-04-23 18:53 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=108010
--- Comment #6 from CVS Commits <cvs-commit at gcc dot gnu.org> ---
The releases/gcc-12 branch has been updated by Harald Anlauf
<anlauf@gcc.gnu.org>:
https://gcc.gnu.org/g:767d85d69f3d3f718f2a294f8e03be3a8aa65c4b
commit r12-9466-g767d85d69f3d3f718f2a294f8e03be3a8aa65c4b
Author: Harald Anlauf <anlauf@gmx.de>
Date: Wed Dec 7 21:50:23 2022 +0100
Fortran: handle zero-sized arrays in ctors with typespec [PR108010]
gcc/fortran/ChangeLog:
PR fortran/108010
* arith.cc (reduce_unary): Handle zero-sized arrays.
(reduce_binary_aa): Likewise.
gcc/testsuite/ChangeLog:
PR fortran/108010
* gfortran.dg/pr108010.f90: New test.
(cherry picked from commit 7d6512d102a5a4fb3939de95bce38d154512a19f)
^ permalink raw reply [flat|nested] 7+ messages in thread
end of thread, other threads:[~2023-04-23 18:53 UTC | newest]
Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-12-07 16:41 [Bug fortran/108010] New: ICE in reduce_unary, at fortran/arith.cc:1345 gscfq@t-online.de
2022-12-07 19:40 ` [Bug fortran/108010] " anlauf at gcc dot gnu.org
2022-12-07 19:40 ` anlauf at gcc dot gnu.org
2022-12-07 20:58 ` anlauf at gcc dot gnu.org
2022-12-07 22:09 ` cvs-commit at gcc dot gnu.org
2022-12-07 22:11 ` anlauf at gcc dot gnu.org
2023-04-23 18:53 ` cvs-commit 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).