This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug fortran/57071] Optimize (-1)**k to 1 - 2 * mod(K, 2)


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

--- Comment #12 from Thomas Koenig <tkoenig at gcc dot gnu.org> ---
Created attachment 30141
  --> http://gcc.gnu.org/bugzilla/attachment.cgi?id=30141&action=edit
Another patch that doesn't work...

I tried to follow the advice in comment#9, but I hit a wall
(again).

With the attached patch, I hit

foo.f90:1:0: error: SSA_NAME_DEF_STMT is wrong
 program main
 ^
Expected definition statement:
_16 = 1.0e+0;

Actual definition statement:
_16 = _24;

so I suspect I need PHI nodes here.

Is this the right approach in general?  Am I missing something
simple here?


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]