This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug fortran/29389] Statement functions are not recognized as pure when they are
- From: "pault at gcc dot gnu dot org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 31 Dec 2006 07:39:01 -0000
- Subject: [Bug fortran/29389] Statement functions are not recognized as pure when they are
- References: <bug-29389-10259@http.gcc.gnu.org/bugzilla/>
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
------- Comment #2 from pault at gcc dot gnu dot org 2006-12-31 07:39 -------
This is fixed by:
resolve.c:1429
static int
pure_function (gfc_expr * e, const char **name)
{
int pure;
/* This is the fix. */
if (e->expr_type == EXPR_FUNCTION
&& e->symtree->n.sym->attr.proc == PROC_ST_FUNCTION)
return 1;
if (e->value.function.esym)
The testcase should set i = 0 and test its value at the end of the main
program, in order to demonstrate that there are no side-effects.
Regtests OK on amd64/Cygwin_NT
Paul
--
pault at gcc dot gnu dot org changed:
What |Removed |Added
----------------------------------------------------------------------------
AssignedTo|unassigned at gcc dot gnu |pault at gcc dot gnu dot org
|dot org |
Status|NEW |ASSIGNED
Last reconfirmed|2006-10-08 20:47:53 |2006-12-31 07:39:01
date| |
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=29389