[Bug fortran/28439] Multiple evaluations of arithmetic if condition

2006-07-22 Thread kargl at gcc dot gnu dot org
--- Comment #8 from kargl at gcc dot gnu dot org 2006-07-22 17:55 --- Subject: Bug 28439 Author: kargl Date: Sat Jul 22 17:55:35 2006 New Revision: 115677 URL: http://gcc.gnu.org/viewcvs?root=gccview=revrev=115677 Log: 2006-07-22 Steven Bosscher [EMAIL PROTECTED] PR

[Bug fortran/28439] Multiple evaluations of arithmetic if condition

2006-07-21 Thread steven at gcc dot gnu dot org
--- Comment #6 from steven at gcc dot gnu dot org 2006-07-21 23:39 --- The definition of gfc_evaluate_now is: trans.h:tree gfc_evaluate_now (tree, stmtblock_t *); And the effect of adding se.pre is to add the code to the block. You can see this going on everywhere in gfortran with a

[Bug fortran/28439] Multiple evaluations of arithmetic if condition

2006-07-21 Thread kargl at gcc dot gnu dot org
--- Comment #7 from kargl at gcc dot gnu dot org 2006-07-22 02:01 --- Steven, I believe you're correct. I misread your patch where I thought you were replacing the line above the one you added. Sorry about the noise. I'll test and commit the patch. --

[Bug fortran/28439] Multiple evaluations of arithmetic if condition

2006-07-19 Thread kargl at gcc dot gnu dot org
--- Comment #1 from kargl at gcc dot gnu dot org 2006-07-19 20:33 --- Yep. The dump-tree-original contains if (myfunc (C.1243) = 0) { if (myfunc (C.1243) 0) goto __label_10; else goto __label_20; } else { goto

[Bug fortran/28439] Multiple evaluations of arithmetic if condition

2006-07-19 Thread steven at gcc dot gnu dot org
--- Comment #2 from steven at gcc dot gnu dot org 2006-07-19 23:03 --- Wrong code. Bad. -- steven at gcc dot gnu dot org changed: What|Removed |Added

[Bug fortran/28439] Multiple evaluations of arithmetic if condition

2006-07-19 Thread steven at gcc dot gnu dot org
-- steven at gcc dot gnu dot org changed: What|Removed |Added Status|UNCONFIRMED |NEW Ever Confirmed|0 |1 Last

[Bug fortran/28439] Multiple evaluations of arithmetic if condition

2006-07-19 Thread pinskia at gcc dot gnu dot org
--- Comment #3 from pinskia at gcc dot gnu dot org 2006-07-19 23:06 --- The easiest way to fix this is most likely wrap the function call in a SAVE_EXPR but I could be wrong. -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=28439

[Bug fortran/28439] Multiple evaluations of arithmetic if condition

2006-07-19 Thread steven at gcc dot gnu dot org
--- Comment #4 from steven at gcc dot gnu dot org 2006-07-19 23:08 --- Andrew, you're wrong. :-P My gfortran skills are not what they used to be, but I believe this is the fix: Index: trans-stmt.c === --- trans-stmt.c

[Bug fortran/28439] Multiple evaluations of arithmetic if condition

2006-07-19 Thread kargl at gcc dot gnu dot org
--- Comment #5 from kargl at gcc dot gnu dot org 2006-07-20 04:37 --- (In reply to comment #4) My gfortran skills are not what they used to be, You're always welcomed to spend some quality time with the gfortran source code :-) but I believe this is the fix: Index: trans-stmt.c