bug report
jaffe@cpthree.unl.edu
jaffe@cpthree.unl.edu
Sat Jul 31 23:33:00 GMT 1999
// The following code produces a segmentation fault when compiled using g++
// (egcs-2.91.66) on an Alpha DP21264. I could not reproduce the bug on
// an Intel machine or a Sparc. The fault occurs on the second pass
// of the for loop, on the line "Integer a;". No options were given to the
// compiler.
// David Jaffe
// Dept. of Math. and Stat.
// Univ. of Nebraska - Lincoln
// U.S.A.
// e-mail: jaffe@cpthree.unl.edu
class Integer {
public:
int a;
Integer( ) { }
~Integer( ) { }
};
bool woof(int n) { return true; }
main( )
{ for ( int i = 0; i < 2; i++ )
{ bool x = false;
{ Integer a; }
x = woof(1) || x; } }
More information about the Gcc-bugs
mailing list