public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug fortran/41117] New: spurious _gfortran_internal_pack (II)
@ 2009-08-19 10:10 jv244 at cam dot ac dot uk
2009-08-19 13:36 ` [Bug fortran/41117] " burnus at gcc dot gnu dot org
` (4 more replies)
0 siblings, 5 replies; 6+ messages in thread
From: jv244 at cam dot ac dot uk @ 2009-08-19 10:10 UTC (permalink / raw)
To: gcc-bugs
Another case of a spurious pack (which really affects performance
unfortunately).
> cat test.f90
MODULE M1
CONTAINS
SUBROUTINE S1(data)
REAL, DIMENSION(*) :: data
END SUBROUTINE S1
END MODULE
SUBROUTINE S2
REAL :: data(10,10)
DO i=1,10
CALL S1(data(:,i))
ENDDO
DO i=1,10
CALL S1(data(1,i))
ENDDO
END SUBROUTINE S2
> cat test.f90.003t.original
s1 (real(kind=4)[0:] * data)
{
(void) 0;
}
s2 ()
{
real(kind=4) data[100];
integer(kind=4) i;
i = 1;
if (i <= 10)
{
while (1)
{
{
logical(kind=4) D.1557;
{
void * D.1554;
struct array1_real(kind=4) parm.0;
integer(kind=8) D.1543;
D.1543 = (integer(kind=8)) i;
parm.0.dtype = 281;
parm.0.dim[0].lbound = 1;
parm.0.dim[0].ubound = 10;
parm.0.dim[0].stride = 1;
parm.0.data = (void *) &data[(D.1543 + -1) * 10];
parm.0.offset = -11;
D.1554 = _gfortran_internal_pack (&parm.0);
s1 (D.1554);
if ((real(kind=4)[0:] *) parm.0.data != (real(kind=4)[0:] *)
D.1554)
{
_gfortran_internal_unpack (&parm.0, D.1554);
{
void * D.1555;
D.1555 = D.1554;
if (D.1555 != 0B)
{
__builtin_free (D.1555);
}
}
}
}
L.1:;
D.1557 = i == 10;
i = i + 1;
if (D.1557) goto L.2;
}
}
}
L.2:;
i = 1;
if (i <= 10)
{
while (1)
{
{
logical(kind=4) D.1560;
s1 (&data[((integer(kind=8)) i + -1) * 10]);
L.3:;
D.1560 = i == 10;
i = i + 1;
if (D.1560) goto L.4;
}
}
}
L.4:;
}
--
Summary: spurious _gfortran_internal_pack (II)
Product: gcc
Version: 4.5.0
Status: UNCONFIRMED
Keywords: missed-optimization
Severity: normal
Priority: P3
Component: fortran
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: jv244 at cam dot ac dot uk
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=41117
^ permalink raw reply [flat|nested] 6+ messages in thread
* [Bug fortran/41117] spurious _gfortran_internal_pack (II)
2009-08-19 10:10 [Bug fortran/41117] New: spurious _gfortran_internal_pack (II) jv244 at cam dot ac dot uk
@ 2009-08-19 13:36 ` burnus at gcc dot gnu dot org
2010-02-10 9:05 ` jv244 at cam dot ac dot uk
` (3 subsequent siblings)
4 siblings, 0 replies; 6+ messages in thread
From: burnus at gcc dot gnu dot org @ 2009-08-19 13:36 UTC (permalink / raw)
To: gcc-bugs
------- Comment #1 from burnus at gcc dot gnu dot org 2009-08-19 13:36 -------
See also PR 41113
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=41117
^ permalink raw reply [flat|nested] 6+ messages in thread
* [Bug fortran/41117] spurious _gfortran_internal_pack (II)
2009-08-19 10:10 [Bug fortran/41117] New: spurious _gfortran_internal_pack (II) jv244 at cam dot ac dot uk
2009-08-19 13:36 ` [Bug fortran/41117] " burnus at gcc dot gnu dot org
@ 2010-02-10 9:05 ` jv244 at cam dot ac dot uk
2010-02-13 12:43 ` pault at gcc dot gnu dot org
` (2 subsequent siblings)
4 siblings, 0 replies; 6+ messages in thread
From: jv244 at cam dot ac dot uk @ 2010-02-10 9:05 UTC (permalink / raw)
To: gcc-bugs
------- Comment #2 from jv244 at cam dot ac dot uk 2010-02-10 09:05 -------
this is also fixed for a compiler with the patch for PR41113 applied
--
jv244 at cam dot ac dot uk changed:
What |Removed |Added
----------------------------------------------------------------------------
BugsThisDependsOn| |41113
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=41117
^ permalink raw reply [flat|nested] 6+ messages in thread
* [Bug fortran/41117] spurious _gfortran_internal_pack (II)
2009-08-19 10:10 [Bug fortran/41117] New: spurious _gfortran_internal_pack (II) jv244 at cam dot ac dot uk
2009-08-19 13:36 ` [Bug fortran/41117] " burnus at gcc dot gnu dot org
2010-02-10 9:05 ` jv244 at cam dot ac dot uk
@ 2010-02-13 12:43 ` pault at gcc dot gnu dot org
2010-02-20 21:51 ` burnus at gcc dot gnu dot org
2010-02-22 5:45 ` pault at gcc dot gnu dot org
4 siblings, 0 replies; 6+ messages in thread
From: pault at gcc dot gnu dot org @ 2010-02-13 12:43 UTC (permalink / raw)
To: gcc-bugs
------- Comment #3 from pault at gcc dot gnu dot org 2010-02-13 12:43 -------
Subject: Bug 41117
Author: pault
Date: Sat Feb 13 12:42:39 2010
New Revision: 156749
URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=156749
Log:
2010-02-13 Paul Thomas <pault@gcc.gnu.org>
PR fortran/41113
PR fortran/41117
* trans-array.c (gfc_conv_array_parameter): Use
gfc_full_array_ref_p to detect full and contiguous variable
arrays. Full array components and contiguous arrays do not need
internal_pack and internal_unpack.
2010-02-13 Paul Thomas <pault@gcc.gnu.org>
PR fortran/41113
PR fortran/41117
* gfortran.dg/internal_pack_6.f90: New test.
Added:
trunk/gcc/testsuite/gfortran.dg/internal_pack_6.f90
Modified:
trunk/gcc/fortran/ChangeLog
trunk/gcc/fortran/trans-array.c
trunk/gcc/testsuite/ChangeLog
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=41117
^ permalink raw reply [flat|nested] 6+ messages in thread
* [Bug fortran/41117] spurious _gfortran_internal_pack (II)
2009-08-19 10:10 [Bug fortran/41117] New: spurious _gfortran_internal_pack (II) jv244 at cam dot ac dot uk
` (2 preceding siblings ...)
2010-02-13 12:43 ` pault at gcc dot gnu dot org
@ 2010-02-20 21:51 ` burnus at gcc dot gnu dot org
2010-02-22 5:45 ` pault at gcc dot gnu dot org
4 siblings, 0 replies; 6+ messages in thread
From: burnus at gcc dot gnu dot org @ 2010-02-20 21:51 UTC (permalink / raw)
To: gcc-bugs
------- Comment #4 from burnus at gcc dot gnu dot org 2010-02-20 21:51 -------
Can this PR be closed as FIXED?
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=41117
^ permalink raw reply [flat|nested] 6+ messages in thread
* [Bug fortran/41117] spurious _gfortran_internal_pack (II)
2009-08-19 10:10 [Bug fortran/41117] New: spurious _gfortran_internal_pack (II) jv244 at cam dot ac dot uk
` (3 preceding siblings ...)
2010-02-20 21:51 ` burnus at gcc dot gnu dot org
@ 2010-02-22 5:45 ` pault at gcc dot gnu dot org
4 siblings, 0 replies; 6+ messages in thread
From: pault at gcc dot gnu dot org @ 2010-02-22 5:45 UTC (permalink / raw)
To: gcc-bugs
------- Comment #5 from pault at gcc dot gnu dot org 2010-02-22 05:45 -------
Fixed on trunk. Thanks for reportimg the problems and all the help, Tobias and
Joost.
Paul
--
pault at gcc dot gnu dot org changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|UNCONFIRMED |RESOLVED
Resolution| |FIXED
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=41117
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2010-02-22 5:45 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2009-08-19 10:10 [Bug fortran/41117] New: spurious _gfortran_internal_pack (II) jv244 at cam dot ac dot uk
2009-08-19 13:36 ` [Bug fortran/41117] " burnus at gcc dot gnu dot org
2010-02-10 9:05 ` jv244 at cam dot ac dot uk
2010-02-13 12:43 ` pault at gcc dot gnu dot org
2010-02-20 21:51 ` burnus at gcc dot gnu dot org
2010-02-22 5:45 ` pault at gcc dot gnu dot 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).