This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

bug report


// 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;    }    }


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]