public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug fortran/56800] New: [fortran-dev Regression] move_alloc_13.f90 failure
@ 2013-04-01 14:57 tkoenig at gcc dot gnu.org
2013-04-01 17:05 ` [Bug fortran/56800] " tkoenig at gcc dot gnu.org
` (6 more replies)
0 siblings, 7 replies; 8+ messages in thread
From: tkoenig at gcc dot gnu.org @ 2013-04-01 14:57 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=56800
Bug #: 56800
Summary: [fortran-dev Regression] move_alloc_13.f90 failure
Classification: Unclassified
Product: gcc
Version: fortran-dev
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: fortran
AssignedTo: unassigned@gcc.gnu.org
ReportedBy: tkoenig@gcc.gnu.org
The move_alloc_13 failure on the fortran-dev branch can be reduced
to a wrong setting of sm to zero in:
ig25@linux-fd1f:~/Krempel/Branch> cat mv.f90
type t
end type t
type, extends(t) :: t2
integer :: a
end type t2
class(t), allocatable :: y(:), z(:)
allocate(y(1), source=[t2(2)])
end
ig25@linux-fd1f:~/Krempel/Branch> gfortran -fdump-tree-original mv.f90
[...]
__builtin_memset (y._data.base_addr, 0, 4);
y._data.dtype = 41;
y._data.dim[0].lower_bound = 1;
y._data.dim[0].extent = 2 - y._data.dim[0].lower_bound;
y._data.dim[0].sm = 0;
y._data.offset = -1;
^ permalink raw reply [flat|nested] 8+ messages in thread
* [Bug fortran/56800] [fortran-dev Regression] move_alloc_13.f90 failure
2013-04-01 14:57 [Bug fortran/56800] New: [fortran-dev Regression] move_alloc_13.f90 failure tkoenig at gcc dot gnu.org
@ 2013-04-01 17:05 ` tkoenig at gcc dot gnu.org
2013-04-01 18:01 ` burnus at gcc dot gnu.org
` (5 subsequent siblings)
6 siblings, 0 replies; 8+ messages in thread
From: tkoenig at gcc dot gnu.org @ 2013-04-01 17:05 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=56800
--- Comment #1 from Thomas Koenig <tkoenig at gcc dot gnu.org> 2013-04-01 17:05:35 UTC ---
The stride needs to be set from the source; it currently
is taken from y (which is an empty type, hence the 0
for sm).
^ permalink raw reply [flat|nested] 8+ messages in thread
* [Bug fortran/56800] [fortran-dev Regression] move_alloc_13.f90 failure
2013-04-01 14:57 [Bug fortran/56800] New: [fortran-dev Regression] move_alloc_13.f90 failure tkoenig at gcc dot gnu.org
2013-04-01 17:05 ` [Bug fortran/56800] " tkoenig at gcc dot gnu.org
@ 2013-04-01 18:01 ` burnus at gcc dot gnu.org
2013-04-01 21:35 ` burnus at gcc dot gnu.org
` (4 subsequent siblings)
6 siblings, 0 replies; 8+ messages in thread
From: burnus at gcc dot gnu.org @ 2013-04-01 18:01 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=56800
--- Comment #2 from Tobias Burnus <burnus at gcc dot gnu.org> 2013-04-01 18:01:03 UTC ---
The problem is in gfc_array_init_size. There, one should first obtain the
element size. And instead of gfc_conv_descriptor_stride_set one should use
gfc_conv_descriptor_sm_set.
Additionally, one could directly set
gfc_conv_descriptor_extent_set (matching the current size variable) instead of
using gfc_conv_descriptor_ubound_set.
The only difficulty is to implement it such that the overflow algorithm works.
^ permalink raw reply [flat|nested] 8+ messages in thread
* [Bug fortran/56800] [fortran-dev Regression] move_alloc_13.f90 failure
2013-04-01 14:57 [Bug fortran/56800] New: [fortran-dev Regression] move_alloc_13.f90 failure tkoenig at gcc dot gnu.org
2013-04-01 17:05 ` [Bug fortran/56800] " tkoenig at gcc dot gnu.org
2013-04-01 18:01 ` burnus at gcc dot gnu.org
@ 2013-04-01 21:35 ` burnus at gcc dot gnu.org
2013-04-27 13:42 ` dominiq at lps dot ens.fr
` (3 subsequent siblings)
6 siblings, 0 replies; 8+ messages in thread
From: burnus at gcc dot gnu.org @ 2013-04-01 21:35 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=56800
--- Comment #3 from Tobias Burnus <burnus at gcc dot gnu.org> 2013-04-01 21:34:55 UTC ---
Created attachment 29769
--> http://gcc.gnu.org/bugzilla/attachment.cgi?id=29769
Early draft patch
The patch mostly implements a fix for this bug - but it needs some clean up in
the bottom part. As I run out of time, I attach it here.
^ permalink raw reply [flat|nested] 8+ messages in thread
* [Bug fortran/56800] [fortran-dev Regression] move_alloc_13.f90 failure
2013-04-01 14:57 [Bug fortran/56800] New: [fortran-dev Regression] move_alloc_13.f90 failure tkoenig at gcc dot gnu.org
` (2 preceding siblings ...)
2013-04-01 21:35 ` burnus at gcc dot gnu.org
@ 2013-04-27 13:42 ` dominiq at lps dot ens.fr
2013-04-30 21:57 ` burnus at gcc dot gnu.org
` (2 subsequent siblings)
6 siblings, 0 replies; 8+ messages in thread
From: dominiq at lps dot ens.fr @ 2013-04-27 13:42 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=56800
Dominique d'Humieres <dominiq at lps dot ens.fr> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|UNCONFIRMED |NEW
Last reconfirmed| |2013-04-27
Ever Confirmed|0 |1
--- Comment #4 from Dominique d'Humieres <dominiq at lps dot ens.fr> 2013-04-27 13:42:51 UTC ---
Confirmed for the fortran-dev branch r198346 with the patch at
http://gcc.gnu.org/ml/fortran/2013-04/msg00237.html.
^ permalink raw reply [flat|nested] 8+ messages in thread
* [Bug fortran/56800] [fortran-dev Regression] move_alloc_13.f90 failure
2013-04-01 14:57 [Bug fortran/56800] New: [fortran-dev Regression] move_alloc_13.f90 failure tkoenig at gcc dot gnu.org
` (3 preceding siblings ...)
2013-04-27 13:42 ` dominiq at lps dot ens.fr
@ 2013-04-30 21:57 ` burnus at gcc dot gnu.org
2013-05-07 10:00 ` burnus at gcc dot gnu.org
2013-05-07 10:01 ` burnus at gcc dot gnu.org
6 siblings, 0 replies; 8+ messages in thread
From: burnus at gcc dot gnu.org @ 2013-04-30 21:57 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=56800
--- Comment #5 from Tobias Burnus <burnus at gcc dot gnu.org> 2013-04-30 21:57:28 UTC ---
For the test case in comment 0:
__builtin_memset (y._data.base_addr, 0, 4);
y._data.rank = 1;
y._data.type = -1;
y._data.dim[0].lower_bound = 1;
y._data.dim[0].extent = 2 - y._data.dim[0].lower_bound;
y._data.dim[0].sm = (integer(kind=8)) y._data.elem_len;
Here a line like:
y._data.elem_len = 4;
is missing. elem_len needs always to be updated for BT_CLASS.
^ permalink raw reply [flat|nested] 8+ messages in thread
* [Bug fortran/56800] [fortran-dev Regression] move_alloc_13.f90 failure
2013-04-01 14:57 [Bug fortran/56800] New: [fortran-dev Regression] move_alloc_13.f90 failure tkoenig at gcc dot gnu.org
` (4 preceding siblings ...)
2013-04-30 21:57 ` burnus at gcc dot gnu.org
@ 2013-05-07 10:00 ` burnus at gcc dot gnu.org
2013-05-07 10:01 ` burnus at gcc dot gnu.org
6 siblings, 0 replies; 8+ 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=56800
--- Comment #6 from Tobias Burnus <burnus at gcc dot gnu.org> 2013-05-07 10:00:20 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] 8+ messages in thread
* [Bug fortran/56800] [fortran-dev Regression] move_alloc_13.f90 failure
2013-04-01 14:57 [Bug fortran/56800] New: [fortran-dev Regression] move_alloc_13.f90 failure tkoenig at gcc dot gnu.org
` (5 preceding siblings ...)
2013-05-07 10:00 ` burnus at gcc dot gnu.org
@ 2013-05-07 10:01 ` burnus at gcc dot gnu.org
6 siblings, 0 replies; 8+ messages in thread
From: burnus at gcc dot gnu.org @ 2013-05-07 10:01 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=56800
Tobias Burnus <burnus at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|NEW |RESOLVED
Resolution| |FIXED
--- Comment #7 from Tobias Burnus <burnus at gcc dot gnu.org> 2013-05-07 10:01:47 UTC ---
really mark as FIXED
^ permalink raw reply [flat|nested] 8+ messages in thread
end of thread, other threads:[~2013-05-07 10:01 UTC | newest]
Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-04-01 14:57 [Bug fortran/56800] New: [fortran-dev Regression] move_alloc_13.f90 failure tkoenig at gcc dot gnu.org
2013-04-01 17:05 ` [Bug fortran/56800] " tkoenig at gcc dot gnu.org
2013-04-01 18:01 ` burnus at gcc dot gnu.org
2013-04-01 21:35 ` burnus at gcc dot gnu.org
2013-04-27 13:42 ` dominiq at lps dot ens.fr
2013-04-30 21:57 ` burnus at gcc dot gnu.org
2013-05-07 10:00 ` burnus at gcc dot gnu.org
2013-05-07 10:01 ` 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).