public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug fortran/56929] New: ICE on dummy argument child class with coarray inside parent
@ 2013-04-12 6:33 damian at rouson dot net
2013-04-12 7:30 ` [Bug fortran/56929] [4.8/4.9 Regression ]ICE " dominiq at lps dot ens.fr
` (4 more replies)
0 siblings, 5 replies; 6+ messages in thread
From: damian at rouson dot net @ 2013-04-12 6:33 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=56929
Bug #: 56929
Summary: ICE on dummy argument child class with coarray inside
parent
Classification: Unclassified
Product: gcc
Version: 4.8.0
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: fortran
AssignedTo: unassigned@gcc.gnu.org
ReportedBy: damian@rouson.net
$ cat all.f90
module parent_coarray_component
type parent
real, allocatable :: dummy[:]
end type
type, extends(parent) :: child
end type
contains
subroutine do_something(this)
class(child) this
end
end
$ gfortran -fcoarray=single -c all.f90
all.f90: In function '__copy_parent_coarray_component_Child':
all.f90:9:0: internal compiler error: Segmentation fault: 11
class(child) this
^
all.f90:9:0: internal compiler error: Abort trap: 6
gfortran: internal compiler error: Abort trap: 6 (program f951)
Abort trap: 6
Damians-MacBook-Pro-2:coarrayBurgers rouson$ gfortran --version
GNU Fortran (MacPorts gcc48 4.8-20130321_0) 4.8.0 20130321 (prerelease)
^ permalink raw reply [flat|nested] 6+ messages in thread
* [Bug fortran/56929] [4.8/4.9 Regression ]ICE on dummy argument child class with coarray inside parent
2013-04-12 6:33 [Bug fortran/56929] New: ICE on dummy argument child class with coarray inside parent damian at rouson dot net
@ 2013-04-12 7:30 ` dominiq at lps dot ens.fr
2013-04-12 9:21 ` [Bug fortran/56929] [OOP] [F08] ICE " burnus at gcc dot gnu.org
` (3 subsequent siblings)
4 siblings, 0 replies; 6+ messages in thread
From: dominiq at lps dot ens.fr @ 2013-04-12 7:30 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=56929
Dominique d'Humieres <dominiq at lps dot ens.fr> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|UNCONFIRMED |NEW
Last reconfirmed| |2013-04-12
CC| |burnus@net-b.de
Summary|ICE on dummy argument child |[4.8/4.9 Regression ]ICE on
|class with coarray inside |dummy argument child class
|parent |with coarray inside parent
Ever Confirmed|0 |1
--- Comment #1 from Dominique d'Humieres <dominiq at lps dot ens.fr> 2013-04-12 07:30:39 UTC ---
Revision 190841 (2012-08-31) gives the following errors
pr56929.f90:9.21:
class(child) this
1
Error: Component '_def_init' at (1) with coarray component shall be a
nonpointer, nonallocatable scalar
pr56929.f90:9.21:
class(child) this
1
Error: Variable 'dst' at (1) is INTENT(OUT) and can thus not be an allocatable
coarray or have coarray components
pr56929.f90:9.21:
class(child) this
1
Error: Component '_def_init' at (1) with coarray component shall be a
nonpointer, nonallocatable scalar
Revision 190924 (2012-09-04) gives the ICE. The cause may be r190869.
^ permalink raw reply [flat|nested] 6+ messages in thread
* [Bug fortran/56929] [OOP] [F08] ICE on dummy argument child class with coarray inside parent
2013-04-12 6:33 [Bug fortran/56929] New: ICE on dummy argument child class with coarray inside parent damian at rouson dot net
2013-04-12 7:30 ` [Bug fortran/56929] [4.8/4.9 Regression ]ICE " dominiq at lps dot ens.fr
@ 2013-04-12 9:21 ` burnus at gcc dot gnu.org
2013-04-12 17:56 ` burnus at gcc dot gnu.org
` (2 subsequent siblings)
4 siblings, 0 replies; 6+ messages in thread
From: burnus at gcc dot gnu.org @ 2013-04-12 9:21 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=56929
Tobias Burnus <burnus at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Keywords| |ice-on-valid-code
CC|burnus@net-b.de |burnus at gcc dot gnu.org
Summary|[4.8/4.9 Regression] [OOP] |[OOP] [F08] ICE on dummy
|[F08] ICE on dummy argument |argument child class with
|child class with coarray |coarray inside parent
|inside parent |
--- Comment #2 from Tobias Burnus <burnus at gcc dot gnu.org> 2013-04-12 09:20:57 UTC ---
The following patch fixes that ICE - but it introduces a follow-up ICE:
error: cannot convert to a pointer type
in gcc/convert.c:81's convert_to_pointer for a component_ref of
child->src->parent->dummy
--- a/gcc/fortran/trans-array.c
+++ b/gcc/fortran/trans-array.c
@@ -7323,3 +7323,3 @@ duplicate_allocatable (tree dest, tree src, tree type,
int rank,
- if (rank == 0)
+ if (!GFC_DESCRIPTOR_TYPE_P (TREE_TYPE (dest)))
{
@@ -7350,3 +7350,9 @@ duplicate_allocatable (tree dest, tree src, tree type,
int rank,
gfc_init_block (&block);
- nelems = get_full_array_size (&block, src, rank);
+
+ if (rank)
+ nelems = get_full_array_size (&block, src, rank);
+ else
+ /* Coarray scalar. */
+ nelems = gfc_index_one_node;
+
tmp = fold_convert (gfc_array_index_type,
^ permalink raw reply [flat|nested] 6+ messages in thread
* [Bug fortran/56929] [OOP] [F08] ICE on dummy argument child class with coarray inside parent
2013-04-12 6:33 [Bug fortran/56929] New: ICE on dummy argument child class with coarray inside parent damian at rouson dot net
2013-04-12 7:30 ` [Bug fortran/56929] [4.8/4.9 Regression ]ICE " dominiq at lps dot ens.fr
2013-04-12 9:21 ` [Bug fortran/56929] [OOP] [F08] ICE " burnus at gcc dot gnu.org
@ 2013-04-12 17:56 ` burnus at gcc dot gnu.org
2013-04-12 17:57 ` burnus at gcc dot gnu.org
2013-04-13 15:53 ` damian at rouson dot net
4 siblings, 0 replies; 6+ messages in thread
From: burnus at gcc dot gnu.org @ 2013-04-12 17:56 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=56929
--- Comment #3 from Tobias Burnus <burnus at gcc dot gnu.org> 2013-04-12 17:56:39 UTC ---
Author: burnus
Date: Fri Apr 12 17:55:48 2013
New Revision: 197930
URL: http://gcc.gnu.org/viewcvs?rev=197930&root=gcc&view=rev
Log:
2013-04-12 Tobias Burnus <burnus@net-b.de>
PR fortran/56929
* trans-array.c (duplicate_allocatable): Fix handling
of scalar coarrays.
2013-04-12 Tobias Burnus <burnus@net-b.de>
PR fortran/56929
* gfortran.dg/coarray/alloc_comp_2.f90: New.
Added:
trunk/gcc/testsuite/gfortran.dg/coarray/alloc_comp_2.f90
Modified:
trunk/gcc/fortran/ChangeLog
trunk/gcc/fortran/trans-array.c
trunk/gcc/testsuite/ChangeLog
^ permalink raw reply [flat|nested] 6+ messages in thread
* [Bug fortran/56929] [OOP] [F08] ICE on dummy argument child class with coarray inside parent
2013-04-12 6:33 [Bug fortran/56929] New: ICE on dummy argument child class with coarray inside parent damian at rouson dot net
` (2 preceding siblings ...)
2013-04-12 17:56 ` burnus at gcc dot gnu.org
@ 2013-04-12 17:57 ` burnus at gcc dot gnu.org
2013-04-13 15:53 ` damian at rouson dot net
4 siblings, 0 replies; 6+ messages in thread
From: burnus at gcc dot gnu.org @ 2013-04-12 17:57 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=56929
Tobias Burnus <burnus at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|NEW |RESOLVED
Resolution| |FIXED
--- Comment #4 from Tobias Burnus <burnus at gcc dot gnu.org> 2013-04-12 17:57:08 UTC ---
FIXED on the trunk (4.9).
Thanks for the report!
^ permalink raw reply [flat|nested] 6+ messages in thread
* [Bug fortran/56929] [OOP] [F08] ICE on dummy argument child class with coarray inside parent
2013-04-12 6:33 [Bug fortran/56929] New: ICE on dummy argument child class with coarray inside parent damian at rouson dot net
` (3 preceding siblings ...)
2013-04-12 17:57 ` burnus at gcc dot gnu.org
@ 2013-04-13 15:53 ` damian at rouson dot net
4 siblings, 0 replies; 6+ messages in thread
From: damian at rouson dot net @ 2013-04-13 15:53 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=56929
--- Comment #5 from Damian Rouson <damian at rouson dot net> 2013-04-13 15:53:51 UTC ---
Thanks for the amazingly fast response! Possibly this sets a record: 11.5
hours from submitting the report to the application of a patch to the trunk.
Any chance this patch can also be applied to the 4.8 branch?
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2013-04-13 15:53 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-04-12 6:33 [Bug fortran/56929] New: ICE on dummy argument child class with coarray inside parent damian at rouson dot net
2013-04-12 7:30 ` [Bug fortran/56929] [4.8/4.9 Regression ]ICE " dominiq at lps dot ens.fr
2013-04-12 9:21 ` [Bug fortran/56929] [OOP] [F08] ICE " burnus at gcc dot gnu.org
2013-04-12 17:56 ` burnus at gcc dot gnu.org
2013-04-12 17:57 ` burnus at gcc dot gnu.org
2013-04-13 15:53 ` damian at rouson dot net
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).