This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug fortran/42189] New: gfc_is_constant_expr has unacceptable side effects
- From: "burnus at gcc dot gnu dot org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 26 Nov 2009 21:58:32 -0000
- Subject: [Bug fortran/42189] New: gfc_is_constant_expr has unacceptable side effects
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
Follow up to PR 41807 - based on the comment at
http://gcc.gnu.org/ml/fortran/2009-11/msg00181.html
cf. also http://gcc.gnu.org/ml/fortran/2009-11/msg00208.html
"it is both unacceptable and unanticipated that gfc_is_constant_expr have side
effects like that. Should we, perhaps copy the expression within
gfc_is_constant_expr, test that and free the new expression before exiting?"
and in http://gcc.gnu.org/ml/fortran/2009-11/msg00185.html
"I think we have some other bugs lurking here. For example, why could we
simplify the original expr in get_array_index and not it's copy. gfc_copy_expr
is missing something.
"The gfc_is_constant_expr issue is down in gfc_constant_ac. I think we may be
trying to expand the constructors in more than one place, in gfc_constant_ac
and somewhere else."
--
Summary: gfc_is_constant_expr has unacceptable side effects
Product: gcc
Version: 4.5.0
Status: UNCONFIRMED
Keywords: wrong-code
Severity: normal
Priority: P3
Component: fortran
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: burnus at gcc dot gnu dot org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=42189