This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug target/22576] [4.0/4.1 regression] ICE with simple factorial program compiled with -ffast-math on gcc 4.0.2
- From: "black dot hole dot sun16 at gmail dot com" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 20 Jul 2005 23:13:11 -0000
- Subject: [Bug target/22576] [4.0/4.1 regression] ICE with simple factorial program compiled with -ffast-math on gcc 4.0.2
- References: <20050720192906.22576.black.hole.sun16@gmail.com>
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
------- Additional Comments From black dot hole dot sun16 at gmail dot com 2005-07-20 23:13 -------
(From update of attachment 9309)
>#include <stdio.h>
>
>/* Program prints the first 10 postitive integers and their factorials */
>
>main()
>{
>long double i, j, k = 1;
>
>for(i = 1; i <= 100; i++)
> {
> for(j = i; j > 0; j = j - 1)
> {
> k = k * j;
> if(j == 1)
> {
> printf("factorial of %Lf is %Lf\n", i, k);
> k = 1;
> }
> }
> }
> return 0;
>}
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=22576