g++ crashes when compiling not-so-intricate source file
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
gcc-4.1 (Ubuntu) |
Fix Released
|
Undecided
|
Matthias Klose |
Bug Description
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=
hab=(x/(1+x*x));
do
{
i++;
}
while(
arct*=hab;
return arct;
}
int main()
{
double Pi;
Pi=4*
cout<<Pi<<endl;
}
/******
And here's the output :
nmaquet@
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://
For Debian GNU/Linux specific bug reporting instructions,
see <URL:file:
Preprocessed source stored into /tmp/ccgAvvVR.out file, please attach this to your bugreport.
This bug was collected during a 1st year CS Bachelor course.