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 middle-end/30433, no longer folding __complex__(0.0, 1.0) == __complex__(1.0, 0.0)


Hi,
  When RTH removed the expanding of some complex in fold, in the process 
he removed the constant folding of complex comparisions. This patch adds 
back the folding of complex comparisions for constants only and not the 
splitting of comparision for normal complex comparisions.

OK? Bootstrapped and tested on i686-linux-gnu with no regressions.


Thanks,
Andrew Pinski

        * fold-const.c (fold_comparison): Add back the
        folding of constant complex comparisions.


        * gcc.c-torture/compile/pr30433.c: New testcase to check
        that complex constants comparisions are foldded.


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