public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug fortran/104227] New: [9/10/11/12 Regression] ICE virtual memory exhausted: Cannot allocate memory
@ 2022-01-25 18:02 gscfq@t-online.de
2022-01-25 20:46 ` [Bug fortran/104227] " anlauf at gcc dot gnu.org
` (7 more replies)
0 siblings, 8 replies; 9+ messages in thread
From: gscfq@t-online.de @ 2022-01-25 18:02 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=104227
Bug ID: 104227
Summary: [9/10/11/12 Regression] ICE virtual memory exhausted:
Cannot allocate memory
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 r8, changed between 20190208 and 20190308 :
(follow-up of pr101514)
$ cat z1.f90
program p
type t
end type
type(t) :: x(2)
print *, transfer(1, x)
end
$ cat z2.f90
program p
type t
end type
type(t) :: x(2)
x = transfer(1, x)
end
$ gfortran-12-20220123 -c z1.f90
virtual memory exhausted: Cannot allocate memory
$ gfortran-12-20220123 -c z2.f90
GNU MP: Cannot allocate memory (size=8)
f951: internal compiler error: Aborted
mmap: Cannot allocate memory
$ gfortran-12-20220123-chk -c z1.f90 # ulimits set
GNU MP: Cannot allocate memory (size=8)
f951: out of memory allocating 139 bytes after a total of 1494507520 bytes
^ permalink raw reply [flat|nested] 9+ messages in thread
* [Bug fortran/104227] [9/10/11/12 Regression] ICE virtual memory exhausted: Cannot allocate memory
2022-01-25 18:02 [Bug fortran/104227] New: [9/10/11/12 Regression] ICE virtual memory exhausted: Cannot allocate memory gscfq@t-online.de
@ 2022-01-25 20:46 ` anlauf at gcc dot gnu.org
2022-01-25 20:57 ` cvs-commit at gcc dot gnu.org
` (6 subsequent siblings)
7 siblings, 0 replies; 9+ messages in thread
From: anlauf at gcc dot gnu.org @ 2022-01-25 20:46 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=104227
anlauf at gcc dot gnu.org changed:
What |Removed |Added
----------------------------------------------------------------------------
Ever confirmed|0 |1
CC| |anlauf at gcc dot gnu.org
Status|UNCONFIRMED |NEW
Last reconfirmed| |2022-01-25
--- Comment #1 from anlauf at gcc dot gnu.org ---
Obvious fix:
diff --git a/gcc/fortran/check.cc b/gcc/fortran/check.cc
index 4fa05ee7e9b..d6c6767ae9e 100644
--- a/gcc/fortran/check.cc
+++ b/gcc/fortran/check.cc
@@ -6151,7 +6151,7 @@ gfc_calculate_transfer_sizes (gfc_expr *source, gfc_expr
*mold, gfc_expr *size,
* If SIZE is present, the result is an array of rank one and size SIZE.
*/
if (result_elt_size == 0 && *source_size > 0 && !size
- && mold->expr_type == EXPR_ARRAY)
+ && (mold->expr_type == EXPR_ARRAY || mold->rank))
{
gfc_error ("%<MOLD%> argument of %<TRANSFER%> intrinsic at %L is an "
"array and shall not have storage size 0 when %<SOURCE%> "
^ permalink raw reply [flat|nested] 9+ messages in thread
* [Bug fortran/104227] [9/10/11/12 Regression] ICE virtual memory exhausted: Cannot allocate memory
2022-01-25 18:02 [Bug fortran/104227] New: [9/10/11/12 Regression] ICE virtual memory exhausted: Cannot allocate memory gscfq@t-online.de
2022-01-25 20:46 ` [Bug fortran/104227] " anlauf at gcc dot gnu.org
@ 2022-01-25 20:57 ` cvs-commit at gcc dot gnu.org
2022-01-25 21:04 ` anlauf at gcc dot gnu.org
` (5 subsequent siblings)
7 siblings, 0 replies; 9+ messages in thread
From: cvs-commit at gcc dot gnu.org @ 2022-01-25 20:57 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=104227
--- Comment #2 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:ec543c9833c2d9283c035cd8430849eb4ec04406
commit r12-6865-gec543c9833c2d9283c035cd8430849eb4ec04406
Author: Harald Anlauf <anlauf@gmx.de>
Date: Tue Jan 25 21:56:39 2022 +0100
Fortran: MOLD argument to TRANSFER intrinsic having storage size zero
gcc/fortran/ChangeLog:
PR fortran/104227
* check.cc (gfc_calculate_transfer_sizes): Fix checking of arrays
passed as MOLD argument to the TRANSFER intrinsic for having
storage size zero.
gcc/testsuite/ChangeLog:
PR fortran/104227
* gfortran.dg/transfer_check_6.f90: New test.
^ permalink raw reply [flat|nested] 9+ messages in thread
* [Bug fortran/104227] [9/10/11/12 Regression] ICE virtual memory exhausted: Cannot allocate memory
2022-01-25 18:02 [Bug fortran/104227] New: [9/10/11/12 Regression] ICE virtual memory exhausted: Cannot allocate memory gscfq@t-online.de
2022-01-25 20:46 ` [Bug fortran/104227] " anlauf at gcc dot gnu.org
2022-01-25 20:57 ` cvs-commit at gcc dot gnu.org
@ 2022-01-25 21:04 ` anlauf at gcc dot gnu.org
2022-01-26 8:16 ` marxin at gcc dot gnu.org
` (4 subsequent siblings)
7 siblings, 0 replies; 9+ messages in thread
From: anlauf at gcc dot gnu.org @ 2022-01-25 21:04 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=104227
anlauf at gcc dot gnu.org changed:
What |Removed |Added
----------------------------------------------------------------------------
Assignee|unassigned at gcc dot gnu.org |anlauf at gcc dot gnu.org
Target Milestone|--- |9.5
Priority|P3 |P4
Status|NEW |ASSIGNED
--- Comment #3 from anlauf at gcc dot gnu.org ---
Taking.
^ permalink raw reply [flat|nested] 9+ messages in thread
* [Bug fortran/104227] [9/10/11/12 Regression] ICE virtual memory exhausted: Cannot allocate memory
2022-01-25 18:02 [Bug fortran/104227] New: [9/10/11/12 Regression] ICE virtual memory exhausted: Cannot allocate memory gscfq@t-online.de
` (2 preceding siblings ...)
2022-01-25 21:04 ` anlauf at gcc dot gnu.org
@ 2022-01-26 8:16 ` marxin at gcc dot gnu.org
2022-01-26 17:13 ` [Bug fortran/104227] [9/10/11 " cvs-commit at gcc dot gnu.org
` (3 subsequent siblings)
7 siblings, 0 replies; 9+ messages in thread
From: marxin at gcc dot gnu.org @ 2022-01-26 8:16 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=104227
Martin Liška <marxin at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |marxin at gcc dot gnu.org
--- Comment #4 from Martin Liška <marxin at gcc dot gnu.org> ---
Just for the record, started with r9-6204-gcdd1793162ce3a8d.
^ permalink raw reply [flat|nested] 9+ messages in thread
* [Bug fortran/104227] [9/10/11 Regression] ICE virtual memory exhausted: Cannot allocate memory
2022-01-25 18:02 [Bug fortran/104227] New: [9/10/11/12 Regression] ICE virtual memory exhausted: Cannot allocate memory gscfq@t-online.de
` (3 preceding siblings ...)
2022-01-26 8:16 ` marxin at gcc dot gnu.org
@ 2022-01-26 17:13 ` cvs-commit at gcc dot gnu.org
2022-01-26 17:56 ` cvs-commit at gcc dot gnu.org
` (2 subsequent siblings)
7 siblings, 0 replies; 9+ messages in thread
From: cvs-commit at gcc dot gnu.org @ 2022-01-26 17:13 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=104227
--- Comment #5 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:276648888d26a931606108981b46ac7bfedf7122
commit r11-9513-g276648888d26a931606108981b46ac7bfedf7122
Author: Harald Anlauf <anlauf@gmx.de>
Date: Tue Jan 25 21:56:39 2022 +0100
Fortran: MOLD argument to TRANSFER intrinsic having storage size zero
gcc/fortran/ChangeLog:
PR fortran/104227
* check.c (gfc_calculate_transfer_sizes): Fix checking of arrays
passed as MOLD argument to the TRANSFER intrinsic for having
storage size zero.
gcc/testsuite/ChangeLog:
PR fortran/104227
* gfortran.dg/transfer_check_6.f90: New test.
(cherry picked from commit ec543c9833c2d9283c035cd8430849eb4ec04406)
^ permalink raw reply [flat|nested] 9+ messages in thread
* [Bug fortran/104227] [9/10/11 Regression] ICE virtual memory exhausted: Cannot allocate memory
2022-01-25 18:02 [Bug fortran/104227] New: [9/10/11/12 Regression] ICE virtual memory exhausted: Cannot allocate memory gscfq@t-online.de
` (4 preceding siblings ...)
2022-01-26 17:13 ` [Bug fortran/104227] [9/10/11 " cvs-commit at gcc dot gnu.org
@ 2022-01-26 17:56 ` cvs-commit at gcc dot gnu.org
2022-01-26 18:02 ` cvs-commit at gcc dot gnu.org
2022-01-26 18:05 ` anlauf at gcc dot gnu.org
7 siblings, 0 replies; 9+ messages in thread
From: cvs-commit at gcc dot gnu.org @ 2022-01-26 17:56 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=104227
--- Comment #6 from CVS Commits <cvs-commit at gcc dot gnu.org> ---
The releases/gcc-10 branch has been updated by Harald Anlauf
<anlauf@gcc.gnu.org>:
https://gcc.gnu.org/g:0646ff3e170b87050bad4448b89406e476f64496
commit r10-10421-g0646ff3e170b87050bad4448b89406e476f64496
Author: Harald Anlauf <anlauf@gmx.de>
Date: Tue Jan 25 21:56:39 2022 +0100
Fortran: MOLD argument to TRANSFER intrinsic having storage size zero
gcc/fortran/ChangeLog:
PR fortran/104227
* check.c (gfc_calculate_transfer_sizes): Fix checking of arrays
passed as MOLD argument to the TRANSFER intrinsic for having
storage size zero.
gcc/testsuite/ChangeLog:
PR fortran/104227
* gfortran.dg/transfer_check_6.f90: New test.
(cherry picked from commit ec543c9833c2d9283c035cd8430849eb4ec04406)
^ permalink raw reply [flat|nested] 9+ messages in thread
* [Bug fortran/104227] [9/10/11 Regression] ICE virtual memory exhausted: Cannot allocate memory
2022-01-25 18:02 [Bug fortran/104227] New: [9/10/11/12 Regression] ICE virtual memory exhausted: Cannot allocate memory gscfq@t-online.de
` (5 preceding siblings ...)
2022-01-26 17:56 ` cvs-commit at gcc dot gnu.org
@ 2022-01-26 18:02 ` cvs-commit at gcc dot gnu.org
2022-01-26 18:05 ` anlauf at gcc dot gnu.org
7 siblings, 0 replies; 9+ messages in thread
From: cvs-commit at gcc dot gnu.org @ 2022-01-26 18:02 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=104227
--- Comment #7 from CVS Commits <cvs-commit at gcc dot gnu.org> ---
The releases/gcc-9 branch has been updated by Harald Anlauf
<anlauf@gcc.gnu.org>:
https://gcc.gnu.org/g:200afb44967520c1c75a35f91c4a56b5e5fb65ff
commit r9-9928-g200afb44967520c1c75a35f91c4a56b5e5fb65ff
Author: Harald Anlauf <anlauf@gmx.de>
Date: Tue Jan 25 21:56:39 2022 +0100
Fortran: MOLD argument to TRANSFER intrinsic having storage size zero
gcc/fortran/ChangeLog:
PR fortran/104227
* check.c (gfc_calculate_transfer_sizes): Fix checking of arrays
passed as MOLD argument to the TRANSFER intrinsic for having
storage size zero.
gcc/testsuite/ChangeLog:
PR fortran/104227
* gfortran.dg/transfer_check_6.f90: New test.
(cherry picked from commit ec543c9833c2d9283c035cd8430849eb4ec04406)
^ permalink raw reply [flat|nested] 9+ messages in thread
* [Bug fortran/104227] [9/10/11 Regression] ICE virtual memory exhausted: Cannot allocate memory
2022-01-25 18:02 [Bug fortran/104227] New: [9/10/11/12 Regression] ICE virtual memory exhausted: Cannot allocate memory gscfq@t-online.de
` (6 preceding siblings ...)
2022-01-26 18:02 ` cvs-commit at gcc dot gnu.org
@ 2022-01-26 18:05 ` anlauf at gcc dot gnu.org
7 siblings, 0 replies; 9+ messages in thread
From: anlauf at gcc dot gnu.org @ 2022-01-26 18:05 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=104227
anlauf at gcc dot gnu.org changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|ASSIGNED |RESOLVED
Resolution|--- |FIXED
--- Comment #8 from anlauf at gcc dot gnu.org ---
Fixed on all open branches. Closing.
Thanks for the report!
^ permalink raw reply [flat|nested] 9+ messages in thread
end of thread, other threads:[~2022-01-26 18:05 UTC | newest]
Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-01-25 18:02 [Bug fortran/104227] New: [9/10/11/12 Regression] ICE virtual memory exhausted: Cannot allocate memory gscfq@t-online.de
2022-01-25 20:46 ` [Bug fortran/104227] " anlauf at gcc dot gnu.org
2022-01-25 20:57 ` cvs-commit at gcc dot gnu.org
2022-01-25 21:04 ` anlauf at gcc dot gnu.org
2022-01-26 8:16 ` marxin at gcc dot gnu.org
2022-01-26 17:13 ` [Bug fortran/104227] [9/10/11 " cvs-commit at gcc dot gnu.org
2022-01-26 17:56 ` cvs-commit at gcc dot gnu.org
2022-01-26 18:02 ` cvs-commit at gcc dot gnu.org
2022-01-26 18:05 ` 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).