public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug fortran/42189] New: gfc_is_constant_expr has unacceptable side effects
@ 2009-11-26 21:58 burnus at gcc dot gnu dot org
2009-12-03 4:08 ` [Bug fortran/42189] " jvdelisle at gcc dot gnu dot org
` (3 more replies)
0 siblings, 4 replies; 9+ messages in thread
From: burnus at gcc dot gnu dot org @ 2009-11-26 21:58 UTC (permalink / raw)
To: gcc-bugs
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
^ permalink raw reply [flat|nested] 9+ messages in thread
* [Bug fortran/42189] gfc_is_constant_expr has unacceptable side effects
2009-11-26 21:58 [Bug fortran/42189] New: gfc_is_constant_expr has unacceptable side effects burnus at gcc dot gnu dot org
@ 2009-12-03 4:08 ` jvdelisle at gcc dot gnu dot org
2009-12-04 19:52 ` dfranke at gcc dot gnu dot org
` (2 subsequent siblings)
3 siblings, 0 replies; 9+ messages in thread
From: jvdelisle at gcc dot gnu dot org @ 2009-12-03 4:08 UTC (permalink / raw)
To: gcc-bugs
------- Comment #1 from jvdelisle at gcc dot gnu dot org 2009-12-03 04:07 -------
I plan to keep poking at this and other general constructor issues.
--
jvdelisle at gcc dot gnu dot org changed:
What |Removed |Added
----------------------------------------------------------------------------
AssignedTo|unassigned at gcc dot gnu |jvdelisle at gcc dot gnu dot
|dot org |org
Status|UNCONFIRMED |ASSIGNED
Ever Confirmed|0 |1
Last reconfirmed|0000-00-00 00:00:00 |2009-12-03 04:07:52
date| |
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=42189
^ permalink raw reply [flat|nested] 9+ messages in thread
* [Bug fortran/42189] gfc_is_constant_expr has unacceptable side effects
2009-11-26 21:58 [Bug fortran/42189] New: gfc_is_constant_expr has unacceptable side effects burnus at gcc dot gnu dot org
2009-12-03 4:08 ` [Bug fortran/42189] " jvdelisle at gcc dot gnu dot org
@ 2009-12-04 19:52 ` dfranke at gcc dot gnu dot org
2009-12-05 4:18 ` jvdelisle at gcc dot gnu dot org
2010-01-23 14:09 ` jvdelisle at gcc dot gnu dot org
3 siblings, 0 replies; 9+ messages in thread
From: dfranke at gcc dot gnu dot org @ 2009-12-04 19:52 UTC (permalink / raw)
To: gcc-bugs
------- Comment #2 from dfranke at gcc dot gnu dot org 2009-12-04 19:52 -------
Jerry, this might be involved in PR41165 as well?!
--
dfranke at gcc dot gnu dot org changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |dfranke at gcc dot gnu dot
| |org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=42189
^ permalink raw reply [flat|nested] 9+ messages in thread
* [Bug fortran/42189] gfc_is_constant_expr has unacceptable side effects
2009-11-26 21:58 [Bug fortran/42189] New: gfc_is_constant_expr has unacceptable side effects burnus at gcc dot gnu dot org
2009-12-03 4:08 ` [Bug fortran/42189] " jvdelisle at gcc dot gnu dot org
2009-12-04 19:52 ` dfranke at gcc dot gnu dot org
@ 2009-12-05 4:18 ` jvdelisle at gcc dot gnu dot org
2010-01-23 14:09 ` jvdelisle at gcc dot gnu dot org
3 siblings, 0 replies; 9+ messages in thread
From: jvdelisle at gcc dot gnu dot org @ 2009-12-05 4:18 UTC (permalink / raw)
To: gcc-bugs
------- Comment #3 from jvdelisle at gcc dot gnu dot org 2009-12-05 04:17 -------
Studying this with a little instrumentation, I see that gfc_expand_constructor
is called only once with some of the test cases for pr20923. This is good.
Also, in the test case for pr41807, the work function constant_element does
nothing but check that the element is constant. In the patch for pr20923 I
will submit shortly, I have renamed it to is_constant_element which is clearer.
Moving on, the is_constant_element work function and the other constructor work
functions are called by expand_constructor. expand_constructor calls
gfc_simplify_expr. It is possible that gfc_simplify_expr is called more than
once on a given constructor expr as the various work functions are exercised. I
have not confirmed this. I wonder if it would make sense to add a flag to
gfc_expr to mark it as having been simplified already and do an early exit from
it for efficiency.
I will do some testing to see if it is indeed being called more than once and
report back.
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=42189
^ permalink raw reply [flat|nested] 9+ messages in thread
* [Bug fortran/42189] gfc_is_constant_expr has unacceptable side effects
2009-11-26 21:58 [Bug fortran/42189] New: gfc_is_constant_expr has unacceptable side effects burnus at gcc dot gnu dot org
` (2 preceding siblings ...)
2009-12-05 4:18 ` jvdelisle at gcc dot gnu dot org
@ 2010-01-23 14:09 ` jvdelisle at gcc dot gnu dot org
3 siblings, 0 replies; 9+ messages in thread
From: jvdelisle at gcc dot gnu dot org @ 2010-01-23 14:09 UTC (permalink / raw)
To: gcc-bugs
------- Comment #4 from jvdelisle at gcc dot gnu dot org 2010-01-23 14:09 -------
Time constraints, un assigning.
--
jvdelisle at gcc dot gnu dot org changed:
What |Removed |Added
----------------------------------------------------------------------------
AssignedTo|jvdelisle at gcc dot gnu dot|unassigned at gcc dot gnu
|org |dot org
Status|ASSIGNED |NEW
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=42189
^ permalink raw reply [flat|nested] 9+ messages in thread
[parent not found: <bug-42189-4@http.gcc.gnu.org/bugzilla/>]
end of thread, other threads:[~2011-03-20 4:33 UTC | newest]
Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2009-11-26 21:58 [Bug fortran/42189] New: gfc_is_constant_expr has unacceptable side effects burnus at gcc dot gnu dot org
2009-12-03 4:08 ` [Bug fortran/42189] " jvdelisle at gcc dot gnu dot org
2009-12-04 19:52 ` dfranke at gcc dot gnu dot org
2009-12-05 4:18 ` jvdelisle at gcc dot gnu dot org
2010-01-23 14:09 ` jvdelisle at gcc dot gnu dot org
[not found] <bug-42189-4@http.gcc.gnu.org/bugzilla/>
2011-02-07 5:32 ` jvdelisle at gcc dot gnu.org
2011-03-06 21:17 ` jvdelisle at gcc dot gnu.org
2011-03-07 10:04 ` dominiq at lps dot ens.fr
2011-03-20 8:13 ` jvdelisle 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).