This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug other/61979] Why float variable loading twice into the FPU Stack during condition checking ?
- From: "nasika.srikanth1 at gmail dot com" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Sat, 02 Aug 2014 11:12:43 +0000
- Subject: [Bug other/61979] Why float variable loading twice into the FPU Stack during condition checking ?
- Auto-submitted: auto-generated
- References: <bug-61979-4 at http dot gcc dot gnu dot org/bugzilla/>
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=61979
--- Comment #6 from Srikanth <nasika.srikanth1 at gmail dot com> ---
int main()
{
float m=12
m?printf("true"):printf("false");
m=0;
m?printf("true"):printf("false");
}
and above is the assemble code generated from the source file .. when i seeing
the assemble code i just recognize that float variable was loading twice during
the conditional checking that's what my doubt ? please tell me why after
comparison of parity flag for NAN or not,directly we can check for zero flag
for zero or not.But the generated assemble code in #comment 3 ,after comparison
of parity flag it again loading the same variable into the FPU stack and again
comparing with zero and checking for zero flag and goes to true or false
statment why?