public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug fortran/86470] [8/9/10/11 Regression] [OOP] ICE with OMP
[not found] <bug-86470-4@http.gcc.gnu.org/bugzilla/>
@ 2021-01-22 21:08 ` anlauf at gcc dot gnu.org
2021-01-27 21:32 ` anlauf at gcc dot gnu.org
` (8 subsequent siblings)
9 siblings, 0 replies; 10+ messages in thread
From: anlauf at gcc dot gnu.org @ 2021-01-22 21:08 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=86470
--- Comment #7 from anlauf at gcc dot gnu.org ---
Untested patch:
diff --git a/gcc/fortran/trans.c b/gcc/fortran/trans.c
index a2376917635..7699e98f6ea 100644
--- a/gcc/fortran/trans.c
+++ b/gcc/fortran/trans.c
@@ -689,9 +689,14 @@ gfc_call_malloc (stmtblock_t * block, tree type, tree
size)
/* Call malloc. */
gfc_start_block (&block2);
- size = fold_convert (size_type_node, size);
- size = fold_build2_loc (input_location, MAX_EXPR, size_type_node, size,
- build_int_cst (size_type_node, 1));
+ if (size)
+ {
+ size = fold_convert (size_type_node, size);
+ size = fold_build2_loc (input_location, MAX_EXPR, size_type_node, size,
+ build_int_cst (size_type_node, 1));
+ }
+ else
+ size = build_int_cst (size_type_node, 1);
malloc_tree = builtin_decl_explicit (BUILT_IN_MALLOC);
gfc_add_modify (&block2, res,
Not sure if this is correct, but it makes gfc_call_malloc match the comment
preceeding that function.
I'll leave the interpretation to the experts.
^ permalink raw reply [flat|nested] 10+ messages in thread
* [Bug fortran/86470] [8/9/10/11 Regression] [OOP] ICE with OMP
[not found] <bug-86470-4@http.gcc.gnu.org/bugzilla/>
2021-01-22 21:08 ` [Bug fortran/86470] [8/9/10/11 Regression] [OOP] ICE with OMP anlauf at gcc dot gnu.org
@ 2021-01-27 21:32 ` anlauf at gcc dot gnu.org
2021-01-28 9:14 ` cvs-commit at gcc dot gnu.org
` (7 subsequent siblings)
9 siblings, 0 replies; 10+ messages in thread
From: anlauf at gcc dot gnu.org @ 2021-01-27 21:32 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=86470
anlauf at gcc dot gnu.org changed:
What |Removed |Added
----------------------------------------------------------------------------
Assignee|unassigned at gcc dot gnu.org |anlauf at gcc dot gnu.org
CC| |anlauf at gcc dot gnu.org
Status|NEW |ASSIGNED
--- Comment #8 from anlauf at gcc dot gnu.org ---
Submitted: https://gcc.gnu.org/pipermail/fortran/2021-January/055647.html
^ permalink raw reply [flat|nested] 10+ messages in thread
* [Bug fortran/86470] [8/9/10/11 Regression] [OOP] ICE with OMP
[not found] <bug-86470-4@http.gcc.gnu.org/bugzilla/>
2021-01-22 21:08 ` [Bug fortran/86470] [8/9/10/11 Regression] [OOP] ICE with OMP anlauf at gcc dot gnu.org
2021-01-27 21:32 ` anlauf at gcc dot gnu.org
@ 2021-01-28 9:14 ` cvs-commit at gcc dot gnu.org
2021-01-28 20:39 ` cvs-commit at gcc dot gnu.org
` (6 subsequent siblings)
9 siblings, 0 replies; 10+ messages in thread
From: cvs-commit at gcc dot gnu.org @ 2021-01-28 9:14 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=86470
--- Comment #9 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:33a7a93218b1393d0135e3c4a9ad9ced87808f5e
commit r11-6950-g33a7a93218b1393d0135e3c4a9ad9ced87808f5e
Author: Harald Anlauf <anlauf@gmx.de>
Date: Thu Jan 28 10:13:46 2021 +0100
PR fortran/86470 - ICE with OpenMP, class(*) allocatable
gfc_call_malloc should malloc an area of size 1 if no size given.
gcc/fortran/ChangeLog:
PR fortran/86470
* trans.c (gfc_call_malloc): Allocate area of size 1 if passed
size is NULL (as documented).
gcc/testsuite/ChangeLog:
PR fortran/86470
* gfortran.dg/gomp/pr86470.f90: New test.
^ permalink raw reply [flat|nested] 10+ messages in thread
* [Bug fortran/86470] [8/9/10/11 Regression] [OOP] ICE with OMP
[not found] <bug-86470-4@http.gcc.gnu.org/bugzilla/>
` (2 preceding siblings ...)
2021-01-28 9:14 ` cvs-commit at gcc dot gnu.org
@ 2021-01-28 20:39 ` cvs-commit at gcc dot gnu.org
2021-01-28 20:45 ` cvs-commit at gcc dot gnu.org
` (5 subsequent siblings)
9 siblings, 0 replies; 10+ messages in thread
From: cvs-commit at gcc dot gnu.org @ 2021-01-28 20:39 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=86470
--- Comment #10 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:0f42bb8722204fb83dcd001cc4254ad25b969402
commit r10-9308-g0f42bb8722204fb83dcd001cc4254ad25b969402
Author: Harald Anlauf <anlauf@gmx.de>
Date: Thu Jan 28 10:13:46 2021 +0100
PR fortran/86470 - ICE with OpenMP, class(*) allocatable
gfc_call_malloc should malloc an area of size 1 if no size given.
gcc/fortran/ChangeLog:
PR fortran/86470
* trans.c (gfc_call_malloc): Allocate area of size 1 if passed
size is NULL (as documented).
gcc/testsuite/ChangeLog:
PR fortran/86470
* gfortran.dg/gomp/pr86470.f90: New test.
(cherry picked from commit 33a7a93218b1393d0135e3c4a9ad9ced87808f5e)
^ permalink raw reply [flat|nested] 10+ messages in thread
* [Bug fortran/86470] [8/9/10/11 Regression] [OOP] ICE with OMP
[not found] <bug-86470-4@http.gcc.gnu.org/bugzilla/>
` (3 preceding siblings ...)
2021-01-28 20:39 ` cvs-commit at gcc dot gnu.org
@ 2021-01-28 20:45 ` cvs-commit at gcc dot gnu.org
2021-01-28 20:52 ` cvs-commit at gcc dot gnu.org
` (4 subsequent siblings)
9 siblings, 0 replies; 10+ messages in thread
From: cvs-commit at gcc dot gnu.org @ 2021-01-28 20:45 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=86470
--- Comment #11 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:2d9597f400e3456240e4499c9a9bc7023380247f
commit r9-9209-g2d9597f400e3456240e4499c9a9bc7023380247f
Author: Harald Anlauf <anlauf@gmx.de>
Date: Thu Jan 28 10:13:46 2021 +0100
PR fortran/86470 - ICE with OpenMP, class(*) allocatable
gfc_call_malloc should malloc an area of size 1 if no size given.
gcc/fortran/ChangeLog:
PR fortran/86470
* trans.c (gfc_call_malloc): Allocate area of size 1 if passed
size is NULL (as documented).
gcc/testsuite/ChangeLog:
PR fortran/86470
* gfortran.dg/gomp/pr86470.f90: New test.
(cherry picked from commit 33a7a93218b1393d0135e3c4a9ad9ced87808f5e)
^ permalink raw reply [flat|nested] 10+ messages in thread
* [Bug fortran/86470] [8/9/10/11 Regression] [OOP] ICE with OMP
[not found] <bug-86470-4@http.gcc.gnu.org/bugzilla/>
` (4 preceding siblings ...)
2021-01-28 20:45 ` cvs-commit at gcc dot gnu.org
@ 2021-01-28 20:52 ` cvs-commit at gcc dot gnu.org
2021-01-28 20:53 ` anlauf at gcc dot gnu.org
` (3 subsequent siblings)
9 siblings, 0 replies; 10+ messages in thread
From: cvs-commit at gcc dot gnu.org @ 2021-01-28 20:52 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=86470
--- Comment #12 from CVS Commits <cvs-commit at gcc dot gnu.org> ---
The releases/gcc-8 branch has been updated by Harald Anlauf
<anlauf@gcc.gnu.org>:
https://gcc.gnu.org/g:dd1537924e18e87a44abbd4063de89f7b48c60d5
commit r8-10744-gdd1537924e18e87a44abbd4063de89f7b48c60d5
Author: Harald Anlauf <anlauf@gmx.de>
Date: Thu Jan 28 10:13:46 2021 +0100
PR fortran/86470 - ICE with OpenMP, class(*) allocatable
gfc_call_malloc should malloc an area of size 1 if no size given.
gcc/fortran/ChangeLog:
PR fortran/86470
* trans.c (gfc_call_malloc): Allocate area of size 1 if passed
size is NULL (as documented).
gcc/testsuite/ChangeLog:
PR fortran/86470
* gfortran.dg/gomp/pr86470.f90: New test.
(cherry picked from commit 33a7a93218b1393d0135e3c4a9ad9ced87808f5e)
^ permalink raw reply [flat|nested] 10+ messages in thread
* [Bug fortran/86470] [8/9/10/11 Regression] [OOP] ICE with OMP
[not found] <bug-86470-4@http.gcc.gnu.org/bugzilla/>
` (5 preceding siblings ...)
2021-01-28 20:52 ` cvs-commit at gcc dot gnu.org
@ 2021-01-28 20:53 ` anlauf at gcc dot gnu.org
2021-03-10 15:29 ` burnus at gcc dot gnu.org
` (2 subsequent siblings)
9 siblings, 0 replies; 10+ messages in thread
From: anlauf at gcc dot gnu.org @ 2021-01-28 20:53 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=86470
anlauf at gcc dot gnu.org changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|ASSIGNED |RESOLVED
Resolution|--- |FIXED
--- Comment #13 from anlauf at gcc dot gnu.org ---
Fixed on all open branches. Closing.
Thanks for the report!
^ permalink raw reply [flat|nested] 10+ messages in thread
* [Bug fortran/86470] [8/9/10/11 Regression] [OOP] ICE with OMP
[not found] <bug-86470-4@http.gcc.gnu.org/bugzilla/>
` (6 preceding siblings ...)
2021-01-28 20:53 ` anlauf at gcc dot gnu.org
@ 2021-03-10 15:29 ` burnus at gcc dot gnu.org
2021-05-24 14:59 ` cvs-commit at gcc dot gnu.org
2021-05-24 15:07 ` burnus at gcc dot gnu.org
9 siblings, 0 replies; 10+ messages in thread
From: burnus at gcc dot gnu.org @ 2021-03-10 15:29 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=86470
Tobias Burnus <burnus at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |burnus at gcc dot gnu.org
--- Comment #14 from Tobias Burnus <burnus at gcc dot gnu.org> ---
It looks as if the committed patch handles this specific testcase correctly,
however, there are still many issues with PRIVATE and FIRSTPRIVATE with
polymorphic list items.
See PR99519 for the follow-up PR, which already contains a link to a
FIRSTPRIVATE patch (but not yet for PRIVATE).
^ permalink raw reply [flat|nested] 10+ messages in thread
* [Bug fortran/86470] [8/9/10/11 Regression] [OOP] ICE with OMP
[not found] <bug-86470-4@http.gcc.gnu.org/bugzilla/>
` (7 preceding siblings ...)
2021-03-10 15:29 ` burnus at gcc dot gnu.org
@ 2021-05-24 14:59 ` cvs-commit at gcc dot gnu.org
2021-05-24 15:07 ` burnus at gcc dot gnu.org
9 siblings, 0 replies; 10+ messages in thread
From: cvs-commit at gcc dot gnu.org @ 2021-05-24 14:59 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=86470
--- Comment #15 from CVS Commits <cvs-commit at gcc dot gnu.org> ---
The master branch has been updated by Tobias Burnus <burnus@gcc.gnu.org>:
https://gcc.gnu.org/g:0e3b3b77e13cac764a135a7118613c47686e0a62
commit r12-1016-g0e3b3b77e13cac764a135a7118613c47686e0a62
Author: Tobias Burnus <tobias@codesourcery.com>
Date: Mon May 24 16:50:51 2021 +0200
OpenMP/Fortran: Handle polymorphic scalars in data-sharing FIRSTPRIVATE
[PR86470]
gcc/fortran/ChangeLog:
PR fortran/86470
* trans-expr.c (gfc_copy_class_to_class): Add unshare_expr.
* trans-openmp.c (gfc_is_polymorphic_nonptr,
gfc_is_unlimited_polymorphic_nonptr): New.
(gfc_omp_clause_copy_ctor, gfc_omp_clause_dtor): Handle
polymorphic scalars.
libgomp/ChangeLog:
PR fortran/86470
* testsuite/libgomp.fortran/class-firstprivate-1.f90: New test.
* testsuite/libgomp.fortran/class-firstprivate-2.f90: New test.
* testsuite/libgomp.fortran/class-firstprivate-3.f90: New test.
gcc/testsuite/ChangeLog:
PR fortran/86470
* gfortran.dg/gomp/class-firstprivate-1.f90: New test.
* gfortran.dg/gomp/class-firstprivate-2.f90: New test.
* gfortran.dg/gomp/class-firstprivate-3.f90: New test.
* gfortran.dg/gomp/class-firstprivate-4.f90: New test.
^ permalink raw reply [flat|nested] 10+ messages in thread
* [Bug fortran/86470] [8/9/10/11 Regression] [OOP] ICE with OMP
[not found] <bug-86470-4@http.gcc.gnu.org/bugzilla/>
` (8 preceding siblings ...)
2021-05-24 14:59 ` cvs-commit at gcc dot gnu.org
@ 2021-05-24 15:07 ` burnus at gcc dot gnu.org
9 siblings, 0 replies; 10+ messages in thread
From: burnus at gcc dot gnu.org @ 2021-05-24 15:07 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=86470
--- Comment #16 from Tobias Burnus <burnus at gcc dot gnu.org> ---
(In reply to Tobias Burnus from comment #14)
> It looks as if the committed patch handles this specific testcase correctly,
> however, there are still many issues with PRIVATE and FIRSTPRIVATE with
> polymorphic list items.
>
> See PR99519 for the follow-up PR, which already contains a link to a
> FIRSTPRIVATE patch (but not yet for PRIVATE).
I forgot to update the PR of the commit of comment 15 to the follow-up PR...
^ permalink raw reply [flat|nested] 10+ messages in thread
end of thread, other threads:[~2021-05-24 15:07 UTC | newest]
Thread overview: 10+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
[not found] <bug-86470-4@http.gcc.gnu.org/bugzilla/>
2021-01-22 21:08 ` [Bug fortran/86470] [8/9/10/11 Regression] [OOP] ICE with OMP anlauf at gcc dot gnu.org
2021-01-27 21:32 ` anlauf at gcc dot gnu.org
2021-01-28 9:14 ` cvs-commit at gcc dot gnu.org
2021-01-28 20:39 ` cvs-commit at gcc dot gnu.org
2021-01-28 20:45 ` cvs-commit at gcc dot gnu.org
2021-01-28 20:52 ` cvs-commit at gcc dot gnu.org
2021-01-28 20:53 ` anlauf at gcc dot gnu.org
2021-03-10 15:29 ` burnus at gcc dot gnu.org
2021-05-24 14:59 ` cvs-commit at gcc dot gnu.org
2021-05-24 15:07 ` burnus 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).