public inbox for gcc-bugs@sourceware.org help / color / mirror / Atom feed
* [Bug fortran/107215] New: ICE in gfc_real2real and gfc_complex2complex @ 2022-10-11 16:54 gscfq@t-online.de 2022-10-11 17:36 ` [Bug fortran/107215] " anlauf at gcc dot gnu.org ` (4 more replies) 0 siblings, 5 replies; 6+ messages in thread From: gscfq@t-online.de @ 2022-10-11 16:54 UTC (permalink / raw) To: gcc-bugs https://gcc.gnu.org/bugzilla/show_bug.cgi?id=107215 Bug ID: 107215 Summary: ICE in gfc_real2real and gfc_complex2complex 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: --- Additional examples affect versions down to at least r5 : $ cat z1.f90 program p double precision, parameter :: z = 1.0d0 real :: y(1) complex :: x(1) x = [real :: -'1'] * z y = z * [real :: -'1'] x = [real :: -(.true.)] * z y = z * [real :: -(.true.)] end $ cat z2.f90 program p double precision, parameter :: z = 1.0d0 real :: y(1) complex :: x(1) x = [complex :: -'1'] * z y = z * [complex :: -'1'] x = [complex :: -(.true.)] * z y = z * [complex :: -(.true.)] end $ gfortran-13-20221009 -c z1.f90 f951: internal compiler error: Segmentation fault 0xd93caf crash_signal ../../gcc/toplev.cc:314 0x77ecb7 gfc_real2real(gfc_expr*, int) ../../gcc/fortran/arith.cc:2201 0x8526c2 gfc_convert_constant(gfc_expr*, bt, int) ../../gcc/fortran/simplify.cc:8762 #... $ gfortran-13-20221009 -c z2.f90 f951: internal compiler error: Segmentation fault 0xd93caf crash_signal ../../gcc/toplev.cc:314 0x77f421 gfc_complex2complex(gfc_expr*, int) ../../gcc/fortran/arith.cc:2444 0x8526c2 gfc_convert_constant(gfc_expr*, bt, int) ../../gcc/fortran/simplify.cc:8762 0x7c9a3b do_simplify ../../gcc/fortran/intrinsic.cc:4658 0x7d5501 gfc_convert_type_warn(gfc_expr*, gfc_typespec*, int, int, bool) ../../gcc/fortran/intrinsic.cc:5384 0x7b7958 gfc_type_convert_binary(gfc_expr*, int) ../../gcc/fortran/expr.cc:985 0x77c317 eval_intrinsic ../../gcc/fortran/arith.cc:1606 0x7eed8c match_add_operand ../../gcc/fortran/matchexp.cc:392 0x7eef3c match_level_2 ../../gcc/fortran/matchexp.cc:480 0x7ef092 match_level_3 ../../gcc/fortran/matchexp.cc:551 0x7ef184 match_level_4 ../../gcc/fortran/matchexp.cc:599 0x7ef184 match_and_operand ../../gcc/fortran/matchexp.cc:693 0x7ef372 match_or_operand ../../gcc/fortran/matchexp.cc:722 0x7ef442 match_equiv_operand ../../gcc/fortran/matchexp.cc:765 0x7ef514 match_level_5 ../../gcc/fortran/matchexp.cc:811 0x7ee8e1 gfc_match_expr(gfc_expr**) ../../gcc/fortran/matchexp.cc:870 0x7e5ec0 gfc_match(char const*, ...) ../../gcc/fortran/match.cc:1131 0x7e7c89 gfc_match_assignment() ../../gcc/fortran/match.cc:1330 0x812e40 match_word ../../gcc/fortran/parse.cc:67 0x812e40 decode_statement ../../gcc/fortran/parse.cc:363 ^ permalink raw reply [flat|nested] 6+ messages in thread
* [Bug fortran/107215] ICE in gfc_real2real and gfc_complex2complex 2022-10-11 16:54 [Bug fortran/107215] New: ICE in gfc_real2real and gfc_complex2complex gscfq@t-online.de @ 2022-10-11 17:36 ` anlauf at gcc dot gnu.org 2022-10-11 18:02 ` anlauf at gcc dot gnu.org ` (3 subsequent siblings) 4 siblings, 0 replies; 6+ messages in thread From: anlauf at gcc dot gnu.org @ 2022-10-11 17:36 UTC (permalink / raw) To: gcc-bugs https://gcc.gnu.org/bugzilla/show_bug.cgi?id=107215 anlauf at gcc dot gnu.org changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |anlauf at gcc dot gnu.org Status|UNCONFIRMED |NEW Ever confirmed|0 |1 Last reconfirmed| |2022-10-11 --- Comment #1 from anlauf at gcc dot gnu.org --- Confirmed. The fix is straightforward after the fix for pr107000. (Code audit). ^ permalink raw reply [flat|nested] 6+ messages in thread
* [Bug fortran/107215] ICE in gfc_real2real and gfc_complex2complex 2022-10-11 16:54 [Bug fortran/107215] New: ICE in gfc_real2real and gfc_complex2complex gscfq@t-online.de 2022-10-11 17:36 ` [Bug fortran/107215] " anlauf at gcc dot gnu.org @ 2022-10-11 18:02 ` anlauf at gcc dot gnu.org 2022-10-11 18:48 ` anlauf at gcc dot gnu.org ` (2 subsequent siblings) 4 siblings, 0 replies; 6+ messages in thread From: anlauf at gcc dot gnu.org @ 2022-10-11 18:02 UTC (permalink / raw) To: gcc-bugs https://gcc.gnu.org/bugzilla/show_bug.cgi?id=107215 --- Comment #2 from anlauf at gcc dot gnu.org --- Created attachment 53692 --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=53692&action=edit Patch Check type of source expr before conversion. ^ permalink raw reply [flat|nested] 6+ messages in thread
* [Bug fortran/107215] ICE in gfc_real2real and gfc_complex2complex 2022-10-11 16:54 [Bug fortran/107215] New: ICE in gfc_real2real and gfc_complex2complex gscfq@t-online.de 2022-10-11 17:36 ` [Bug fortran/107215] " anlauf at gcc dot gnu.org 2022-10-11 18:02 ` anlauf at gcc dot gnu.org @ 2022-10-11 18:48 ` anlauf at gcc dot gnu.org 2022-10-11 21:08 ` cvs-commit at gcc dot gnu.org 2022-10-11 21:10 ` anlauf at gcc dot gnu.org 4 siblings, 0 replies; 6+ messages in thread From: anlauf at gcc dot gnu.org @ 2022-10-11 18:48 UTC (permalink / raw) To: gcc-bugs https://gcc.gnu.org/bugzilla/show_bug.cgi?id=107215 anlauf at gcc dot gnu.org changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |ASSIGNED --- Comment #3 from anlauf at gcc dot gnu.org --- Submitted: https://gcc.gnu.org/pipermail/fortran/2022-October/058326.html ^ permalink raw reply [flat|nested] 6+ messages in thread
* [Bug fortran/107215] ICE in gfc_real2real and gfc_complex2complex 2022-10-11 16:54 [Bug fortran/107215] New: ICE in gfc_real2real and gfc_complex2complex gscfq@t-online.de ` (2 preceding siblings ...) 2022-10-11 18:48 ` anlauf at gcc dot gnu.org @ 2022-10-11 21:08 ` cvs-commit at gcc dot gnu.org 2022-10-11 21:10 ` anlauf at gcc dot gnu.org 4 siblings, 0 replies; 6+ messages in thread From: cvs-commit at gcc dot gnu.org @ 2022-10-11 21:08 UTC (permalink / raw) To: gcc-bugs https://gcc.gnu.org/bugzilla/show_bug.cgi?id=107215 --- 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:53955284c031a17e6e49e730ef8947fe557ff35e commit r13-3238-g53955284c031a17e6e49e730ef8947fe557ff35e Author: Harald Anlauf <anlauf@gmx.de> Date: Tue Oct 11 20:37:42 2022 +0200 Fortran: check types of source expressions before conversion [PR107215] gcc/fortran/ChangeLog: PR fortran/107215 * arith.cc (gfc_int2int): Check validity of type of source expr. (gfc_int2real): Likewise. (gfc_int2complex): Likewise. (gfc_real2int): Likewise. (gfc_real2real): Likewise. (gfc_complex2int): Likewise. (gfc_complex2real): Likewise. (gfc_complex2complex): Likewise. (gfc_log2log): Likewise. (gfc_log2int): Likewise. (gfc_int2log): Likewise. gcc/testsuite/ChangeLog: PR fortran/107215 * gfortran.dg/pr107215.f90: New test. ^ permalink raw reply [flat|nested] 6+ messages in thread
* [Bug fortran/107215] ICE in gfc_real2real and gfc_complex2complex 2022-10-11 16:54 [Bug fortran/107215] New: ICE in gfc_real2real and gfc_complex2complex gscfq@t-online.de ` (3 preceding siblings ...) 2022-10-11 21:08 ` cvs-commit at gcc dot gnu.org @ 2022-10-11 21:10 ` anlauf at gcc dot gnu.org 4 siblings, 0 replies; 6+ messages in thread From: anlauf at gcc dot gnu.org @ 2022-10-11 21:10 UTC (permalink / raw) To: gcc-bugs https://gcc.gnu.org/bugzilla/show_bug.cgi?id=107215 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 for gcc-13. Closing. Thanks for the report! ^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2022-10-11 21:10 UTC | newest] Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed) -- links below jump to the message on this page -- 2022-10-11 16:54 [Bug fortran/107215] New: ICE in gfc_real2real and gfc_complex2complex gscfq@t-online.de 2022-10-11 17:36 ` [Bug fortran/107215] " anlauf at gcc dot gnu.org 2022-10-11 18:02 ` anlauf at gcc dot gnu.org 2022-10-11 18:48 ` anlauf at gcc dot gnu.org 2022-10-11 21:08 ` cvs-commit at gcc dot gnu.org 2022-10-11 21:10 ` 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).