------- Comment #29 from dominiq at lps dot ens dot fr  2007-06-24 19:28 -------
>Try with -fwarpv, I bet this is really a bug in g95's IR.  

-fwarpv is not recognized by g95.

> Can you provide me (us) with the tree dumps?

Do you want all of them? If yes, what is the best way to send them?
Otherwise which ones do you want among the ~70 of them?

Without optimization the asembly code is:

...
L2:
        lwz r0,68(r30)
        cmpwi cr7,r0,0
        beq cr7,L3
        lwz r2,84(r30)
        addi r0,r2,1
        stw r0,84(r30)
        lwz r2,60(r30)
        addi r0,r2,1
        stw r0,60(r30)
        lwz r2,68(r30)
        addi r0,r2,-1
        stw r0,68(r30)
        b L2
L3:
...

with -O3, it is:

...
L2:
        b L2
...

> Some cases are our fault, others are g95's fault and Andy might not
> want to say it is his fault if the middle-end optimizes away stuff
> based on undefined code (which I bet is happening in the last case).

I did report the problems I have seen with g95 and gcc4.1, just to let people
know that they might see them. Also I have read the Andy's reply more on the
mode: 

problems with -O* => middle-end problem (and I don't have time to dig them)

rather than putting an explicit blame on the gcc part.

I am aware of these problems probably for over a year, so you might guess that
I did not give them a very high priority.  Now i'll be glad if someone is
willing to have a look at their possible origin.

BTW should we keep this discussion in this PR or open a new one?


-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=32393

Reply via email to