Public bug reported:
Binary package hint: g++-4.1
Here is the source-code that exposes the bug :
/***************************************/
#include <iostream>
using namespace std;
double arctan(double x)
{
int i=1,n=20;
double c=1.0,arct=0.0,paf=1.0,eps=0.00001,hab;
hab=(x/(1+x*x));
do
{
arct+=paf;
c+=2i/(2i+1);
paf=(c*hab);
i++;
}
while((i<n)||(paf>eps));
arct*=hab;
return arct;
}
int main()
{
double Pi;
Pi=4*(4*arctan(1/5)-arctan(1/239));
cout<<Pi<<endl;
}
/***************************************/
And here's the output :
[EMAIL PROTECTED]:/tmp$ g++ bug.cpp
bug.cpp: In function ‘double arctan(double)’:
bug.cpp:12: internal compiler error: in const_binop, at fold-const.c:1641
Please submit a full bug report,
with preprocessed source if appropriate.
See <URL:http://gcc.gnu.org/bugs.html> for instructions.
For Debian GNU/Linux specific bug reporting instructions,
see <URL:file:///usr/share/doc/gcc-4.1/README.Bugs>.
Preprocessed source stored into /tmp/ccgAvvVR.out file, please attach this to
your bugreport.
** Affects: gcc-4.1 (Ubuntu)
Importance: Undecided
Status: New
--
g++ crashes when compiling not-so-intricate source file
https://bugs.launchpad.net/bugs/155259
You received this bug notification because you are a member of Ubuntu
Bugs, which is the bug contact for Ubuntu.
--
ubuntu-bugs mailing list
[email protected]
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs