This is the mail archive of the gcc-patches@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]

[PATCH] Fix PR 37782, Stage2 ada compiler miscompiled


Hi,
  The problem here is that in some cases doloop_modify will do the
addition in the wrong mode, causing to get the wrong answer; this only
happens if zero_extend_p is true which was added by me to that removes
an addition in some cases.  This fixes the problem by adding an
argument to doloop_modify which says the original mode of count and
does the addition in that mode.

OK?  Bootstrapped and tested on powerpc64-linux-gnu with no
regressions (but no Ada).  Also tested by Andreas Schwab on
powerpc64-linux-gnu with no regressions for Ada.

Thanks,
Andrew Pinski

ChangeLog:
* loop-doloop.c (doloop_modify): Add from_mode argument that says what
mode count is in.
(doloop_optimize): Update call to doloop_modify.

Attachment: fixadappc.diff.txt
Description: Text document


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