public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug fortran/52029] New: [OOP] _copy should be PURE
@ 2012-01-28 18:48 burnus at gcc dot gnu.org
2012-01-31 19:09 ` [Bug fortran/52029] " burnus at gcc dot gnu.org
2012-01-31 19:40 ` burnus at gcc dot gnu.org
0 siblings, 2 replies; 3+ messages in thread
From: burnus at gcc dot gnu.org @ 2012-01-28 18:48 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=52029
Bug #: 52029
Summary: [OOP] _copy should be PURE
Classification: Unclassified
Product: gcc
Version: 4.7.0
Status: UNCONFIRMED
Keywords: missed-optimization, rejects-valid
Severity: normal
Priority: P3
Component: fortran
AssignedTo: unassigned@gcc.gnu.org
ReportedBy: burnus@gcc.gnu.org
The _copy procedure should be PURE.
First, it is pure (which should help with optimization).
Secondly, it avoids an error for:
! Contained procedure '__copy_foo_T' of a PURE procedure must also be PURE
elemental subroutine foo()
type t
end type t
class(t), allocatable :: x
if (allocated(x)) i = 5
end
Draft patch:
--- class.c (Revision 183667)
+++ class.c
@@ -717,0 +718 @@ gfc_find_derived_vtab (gfc_symbol *deriv
+ copy->attr.pure = 1;
^ permalink raw reply [flat|nested] 3+ messages in thread
* [Bug fortran/52029] [OOP] _copy should be PURE
2012-01-28 18:48 [Bug fortran/52029] New: [OOP] _copy should be PURE burnus at gcc dot gnu.org
@ 2012-01-31 19:09 ` burnus at gcc dot gnu.org
2012-01-31 19:40 ` burnus at gcc dot gnu.org
1 sibling, 0 replies; 3+ messages in thread
From: burnus at gcc dot gnu.org @ 2012-01-31 19:09 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=52029
--- Comment #1 from Tobias Burnus <burnus at gcc dot gnu.org> 2012-01-31 18:38:49 UTC ---
Author: burnus
Date: Tue Jan 31 18:38:43 2012
New Revision: 183770
URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=183770
Log:
2012-01-31 Tobias Burnus <burnus@net-b.de>
PR fortran/52029
* class.c (gfc_find_derived_vtab): Mark _copy function as pure.
2012-01-31 Tobias Burnus <burnus@net-b.de>
PR fortran/52029
* gfortran.dg/class_49.f90: New.
Added:
trunk/gcc/testsuite/gfortran.dg/class_49.f90
Modified:
trunk/gcc/fortran/ChangeLog
trunk/gcc/fortran/class.c
trunk/gcc/testsuite/ChangeLog
^ permalink raw reply [flat|nested] 3+ messages in thread
* [Bug fortran/52029] [OOP] _copy should be PURE
2012-01-28 18:48 [Bug fortran/52029] New: [OOP] _copy should be PURE burnus at gcc dot gnu.org
2012-01-31 19:09 ` [Bug fortran/52029] " burnus at gcc dot gnu.org
@ 2012-01-31 19:40 ` burnus at gcc dot gnu.org
1 sibling, 0 replies; 3+ messages in thread
From: burnus at gcc dot gnu.org @ 2012-01-31 19:40 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=52029
Tobias Burnus <burnus at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|UNCONFIRMED |RESOLVED
CC| |burnus at gcc dot gnu.org
Resolution| |FIXED
--- Comment #2 from Tobias Burnus <burnus at gcc dot gnu.org> 2012-01-31 19:01:36 UTC ---
FIXED on the trunk (4.7).
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2012-01-31 19:01 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-01-28 18:48 [Bug fortran/52029] New: [OOP] _copy should be PURE burnus at gcc dot gnu.org
2012-01-31 19:09 ` [Bug fortran/52029] " burnus at gcc dot gnu.org
2012-01-31 19:40 ` 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).