public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug libfortran/57174] New: RTE triggered by type component allocation
@ 2013-05-05 10:54 Bader at lrz dot de
2013-05-05 22:04 ` [Bug libfortran/57174] [Fortran-Dev] " burnus at gcc dot gnu.org
2013-05-07 10:00 ` burnus at gcc dot gnu.org
0 siblings, 2 replies; 3+ messages in thread
From: Bader at lrz dot de @ 2013-05-05 10:54 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=57174
Bug #: 57174
Summary: RTE triggered by type component allocation
Classification: Unclassified
Product: gcc
Version: fortran-dev
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: libfortran
AssignedTo: unassigned@gcc.gnu.org
ReportedBy: Bader@lrz.de
The following code, when compiled with the fortran-dev from 20130430, produces
the error
At line 18 of file PMRgf.f90
Fortran runtime error: Attempting to allocate already allocated variable
'__tmp_type_t2'
at execution time.
module mod_noninter_array_01
implicit none
type :: t1
integer, allocatable :: i(:)
end type t1
type, extends(t1) :: t2
real, pointer :: p
end type
end module mod_noninter_array_01
program noninter_array_01
use mod_noninter_array_01
implicit none
class(t1), allocatable :: n_t1(:,:)
allocate(t2 :: n_t1(2,2))
select type(n_t1)
type is (t2)
allocate(n_t1(1,2)%i(2), source=[2,3])
end select
end program noninter_array_01
^ permalink raw reply [flat|nested] 3+ messages in thread
* [Bug libfortran/57174] [Fortran-Dev] RTE triggered by type component allocation
2013-05-05 10:54 [Bug libfortran/57174] New: RTE triggered by type component allocation Bader at lrz dot de
@ 2013-05-05 22:04 ` burnus at gcc dot gnu.org
2013-05-07 10:00 ` burnus at gcc dot gnu.org
1 sibling, 0 replies; 3+ messages in thread
From: burnus at gcc dot gnu.org @ 2013-05-05 22:04 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=57174
Tobias Burnus <burnus at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Keywords| |wrong-code
CC| |burnus at gcc dot gnu.org
Depends on| |56800
Summary|RTE triggered by type |[Fortran-Dev] RTE triggered
|component allocation |by type component
| |allocation
--- Comment #1 from Tobias Burnus <burnus at gcc dot gnu.org> 2013-05-05 22:04:35 UTC ---
Probably the same issue as PR56800. The ALLOCATE doesn't update "elem_len"
which remains at the value of the declared type.
^ permalink raw reply [flat|nested] 3+ messages in thread
* [Bug libfortran/57174] [Fortran-Dev] RTE triggered by type component allocation
2013-05-05 10:54 [Bug libfortran/57174] New: RTE triggered by type component allocation Bader at lrz dot de
2013-05-05 22:04 ` [Bug libfortran/57174] [Fortran-Dev] " burnus at gcc dot gnu.org
@ 2013-05-07 10:00 ` burnus at gcc dot gnu.org
1 sibling, 0 replies; 3+ messages in thread
From: burnus at gcc dot gnu.org @ 2013-05-07 10:00 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=57174
Tobias Burnus <burnus at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|UNCONFIRMED |RESOLVED
Resolution| |FIXED
--- Comment #2 from Tobias Burnus <burnus at gcc dot gnu.org> 2013-05-07 09:59:59 UTC ---
FIXED by the following commit (on the Fortran-dev branch).
Thanks for the report!
Author: burnus
Date: Tue May 7 09:37:19 2013
New Revision: 198669
URL: http://gcc.gnu.org/viewcvs?rev=198669&root=gcc&view=rev
Log:
2013-05-07 Tobias Burnus <burnus@net-b.de>
* trans-array.c (gfc_conv_descriptor_stride_get,
gfc_conv_descriptor_stride_set): Use elem_len, unless it is
a nonstring intrinsic type for which size_in_bytes is used.
(gfc_array_init_size): Set elem_len before handling the
strides.
* trans-expr.c (gfc_conv_subref_array_arg): Remove no-op
extent shifting code.
Modified:
branches/fortran-dev/gcc/fortran/ChangeLog.fortran-dev
branches/fortran-dev/gcc/fortran/trans-array.c
branches/fortran-dev/gcc/fortran/trans-expr.c
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2013-05-07 10:00 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-05-05 10:54 [Bug libfortran/57174] New: RTE triggered by type component allocation Bader at lrz dot de
2013-05-05 22:04 ` [Bug libfortran/57174] [Fortran-Dev] " burnus at gcc dot gnu.org
2013-05-07 10:00 ` 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).