public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug fortran/104212] New: ICE in transformational_result, at fortran/simplify.cc:466
@ 2022-01-24 19:01 gscfq@t-online.de
2022-01-24 20:15 ` [Bug fortran/104212] " anlauf at gcc dot gnu.org
` (4 more replies)
0 siblings, 5 replies; 6+ messages in thread
From: gscfq@t-online.de @ 2022-01-24 19:01 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=104212
Bug ID: 104212
Summary: ICE in transformational_result, at
fortran/simplify.cc:466
Product: gcc
Version: 12.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 *, parity(reshape([.true.,.false.], shape=[1,2]), dim=[1])
end
$ cat z2.f90
program p
print *, parity(reshape([.true.,.false.], shape=[1,2]), dim=shape(1))
end
$ gfortran-12-20220123 -c z1.f90
f951: internal compiler error: Segmentation fault
0xcc430f crash_signal
../../gcc/toplev.cc:322
0x77b0b5 __gmpz_get_ui
/usr/include/gmp.h:1778
0x77b0b5 transformational_result
../../gcc/fortran/simplify.cc:466
0x782769 simplify_transformation
../../gcc/fortran/simplify.cc:719
0x7020d6 do_simplify
../../gcc/fortran/intrinsic.cc:4669
0x70cfea gfc_intrinsic_func_interface(gfc_expr*, int)
../../gcc/fortran/intrinsic.cc:5055
0x761368 resolve_unknown_f
../../gcc/fortran/resolve.cc:2972
0x761368 resolve_function
../../gcc/fortran/resolve.cc:3329
0x761368 gfc_resolve_expr(gfc_expr*)
../../gcc/fortran/resolve.cc:7169
0x767754 gfc_resolve_expr(gfc_expr*)
../../gcc/fortran/resolve.cc:7136
0x767754 gfc_resolve_code(gfc_code*, gfc_namespace*)
../../gcc/fortran/resolve.cc:11928
0x76610f gfc_resolve_blocks(gfc_code*, gfc_namespace*)
../../gcc/fortran/resolve.cc:10944
0x766468 gfc_resolve_code(gfc_code*, gfc_namespace*)
../../gcc/fortran/resolve.cc:11918
0x768da7 resolve_codes
../../gcc/fortran/resolve.cc:17537
0x768e6e gfc_resolve(gfc_namespace*)
../../gcc/fortran/resolve.cc:17572
0x751194 resolve_all_program_units
../../gcc/fortran/parse.cc:6586
0x751194 gfc_parse_file()
../../gcc/fortran/parse.cc:6842
0x79e86f gfc_be_parse_file
../../gcc/fortran/f95-lang.cc:216
^ permalink raw reply [flat|nested] 6+ messages in thread
* [Bug fortran/104212] ICE in transformational_result, at fortran/simplify.cc:466
2022-01-24 19:01 [Bug fortran/104212] New: ICE in transformational_result, at fortran/simplify.cc:466 gscfq@t-online.de
@ 2022-01-24 20:15 ` anlauf at gcc dot gnu.org
2022-01-24 20:53 ` 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-01-24 20:15 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=104212
anlauf at gcc dot gnu.org changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|UNCONFIRMED |NEW
Ever confirmed|0 |1
Last reconfirmed| |2022-01-24
Priority|P3 |P4
CC| |anlauf at gcc dot gnu.org
--- Comment #1 from anlauf at gcc dot gnu.org ---
Confirmed.
We simply need a check on argument DIM:
diff --git a/gcc/fortran/check.cc b/gcc/fortran/check.cc
index 5fe8d452413..431a803c4c6 100644
--- a/gcc/fortran/check.cc
+++ b/gcc/fortran/check.cc
@@ -4476,6 +4476,9 @@ gfc_check_parity (gfc_expr *mask, gfc_expr *dim)
if (!array_check (mask, 0))
return false;
+ if (!dim_check (dim, 1, false))
+ return false;
+
if (!dim_rank_check (dim, mask, false))
return false;
^ permalink raw reply [flat|nested] 6+ messages in thread
* [Bug fortran/104212] ICE in transformational_result, at fortran/simplify.cc:466
2022-01-24 19:01 [Bug fortran/104212] New: ICE in transformational_result, at fortran/simplify.cc:466 gscfq@t-online.de
2022-01-24 20:15 ` [Bug fortran/104212] " anlauf at gcc dot gnu.org
@ 2022-01-24 20:53 ` anlauf at gcc dot gnu.org
2022-01-25 20:18 ` cvs-commit at gcc dot gnu.org
` (2 subsequent siblings)
4 siblings, 0 replies; 6+ messages in thread
From: anlauf at gcc dot gnu.org @ 2022-01-24 20:53 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=104212
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 #2 from anlauf at gcc dot gnu.org ---
Posted: https://gcc.gnu.org/pipermail/fortran/2022-January/057446.html
^ permalink raw reply [flat|nested] 6+ messages in thread
* [Bug fortran/104212] ICE in transformational_result, at fortran/simplify.cc:466
2022-01-24 19:01 [Bug fortran/104212] New: ICE in transformational_result, at fortran/simplify.cc:466 gscfq@t-online.de
2022-01-24 20:15 ` [Bug fortran/104212] " anlauf at gcc dot gnu.org
2022-01-24 20:53 ` anlauf at gcc dot gnu.org
@ 2022-01-25 20:18 ` cvs-commit at gcc dot gnu.org
2022-01-26 17:50 ` cvs-commit at gcc dot gnu.org
2022-01-26 17:51 ` anlauf at gcc dot gnu.org
4 siblings, 0 replies; 6+ messages in thread
From: cvs-commit at gcc dot gnu.org @ 2022-01-25 20:18 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=104212
--- Comment #3 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:34e8dafb76240f69c729c11cfc8c8fc4f717bc17
commit r12-6864-g34e8dafb76240f69c729c11cfc8c8fc4f717bc17
Author: Harald Anlauf <anlauf@gmx.de>
Date: Mon Jan 24 21:40:41 2022 +0100
Fortran: optional argument DIM for intrinsics NORM2, PARITY must be scalar
gcc/fortran/ChangeLog:
PR fortran/104212
* check.cc (gfc_check_norm2): Check that optional argument DIM is
scalar.
(gfc_check_parity): Likewise.
gcc/testsuite/ChangeLog:
PR fortran/104212
* gfortran.dg/argument_checking_26.f90: New test.
^ permalink raw reply [flat|nested] 6+ messages in thread
* [Bug fortran/104212] ICE in transformational_result, at fortran/simplify.cc:466
2022-01-24 19:01 [Bug fortran/104212] New: ICE in transformational_result, at fortran/simplify.cc:466 gscfq@t-online.de
` (2 preceding siblings ...)
2022-01-25 20:18 ` cvs-commit at gcc dot gnu.org
@ 2022-01-26 17:50 ` cvs-commit at gcc dot gnu.org
2022-01-26 17:51 ` anlauf at gcc dot gnu.org
4 siblings, 0 replies; 6+ messages in thread
From: cvs-commit at gcc dot gnu.org @ 2022-01-26 17:50 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=104212
--- Comment #4 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:f3c7cb5fb8ade6eb5583d429cb3e99f6fd5fca61
commit r11-9514-gf3c7cb5fb8ade6eb5583d429cb3e99f6fd5fca61
Author: Harald Anlauf <anlauf@gmx.de>
Date: Mon Jan 24 21:40:41 2022 +0100
Fortran: optional argument DIM for intrinsics NORM2, PARITY must be scalar
gcc/fortran/ChangeLog:
PR fortran/104212
* check.c (gfc_check_norm2): Check that optional argument DIM is
scalar.
(gfc_check_parity): Likewise.
gcc/testsuite/ChangeLog:
PR fortran/104212
* gfortran.dg/argument_checking_26.f90: New test.
(cherry picked from commit 34e8dafb76240f69c729c11cfc8c8fc4f717bc17)
^ permalink raw reply [flat|nested] 6+ messages in thread
* [Bug fortran/104212] ICE in transformational_result, at fortran/simplify.cc:466
2022-01-24 19:01 [Bug fortran/104212] New: ICE in transformational_result, at fortran/simplify.cc:466 gscfq@t-online.de
` (3 preceding siblings ...)
2022-01-26 17:50 ` cvs-commit at gcc dot gnu.org
@ 2022-01-26 17:51 ` anlauf at gcc dot gnu.org
4 siblings, 0 replies; 6+ messages in thread
From: anlauf at gcc dot gnu.org @ 2022-01-26 17:51 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=104212
anlauf at gcc dot gnu.org changed:
What |Removed |Added
----------------------------------------------------------------------------
Resolution|--- |FIXED
Status|ASSIGNED |RESOLVED
Target Milestone|--- |11.3
--- Comment #5 from anlauf at gcc dot gnu.org ---
Fixed.
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2022-01-26 17:51 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-01-24 19:01 [Bug fortran/104212] New: ICE in transformational_result, at fortran/simplify.cc:466 gscfq@t-online.de
2022-01-24 20:15 ` [Bug fortran/104212] " anlauf at gcc dot gnu.org
2022-01-24 20:53 ` anlauf at gcc dot gnu.org
2022-01-25 20:18 ` cvs-commit at gcc dot gnu.org
2022-01-26 17:50 ` cvs-commit at gcc dot gnu.org
2022-01-26 17:51 ` 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).