Bug 25375 - G++ seg fault
G++ seg fault
Status: CLOSED DUPLICATE of bug 24115
Product: Red Hat Linux
Classification: Retired
Component: gcc (Show other bugs)
7.0
i386 Linux
medium Severity medium
: ---
: ---
Assigned To: Jakub Jelinek
David Lawrence
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2001-01-31 08:07 EST by Han-Wen Nienhuys
Modified: 2007-04-18 12:31 EDT (History)
0 users

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2001-01-31 08:07:10 EST
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description Han-Wen Nienhuys 2001-01-31 08:07:06 EST
From Bugzilla Helper:
User-Agent: Mozilla/4.75 [en] (X11; U; Linux 2.4.0 i686)


See included source snippet. COmpiling with the right options crashes GCC.
This RedHat 7 update gcc-c++-2.96-69

Reproducible: Always
Steps to Reproduce:
/*
  dokkum:~/usr/src$ g++ -funroll-loops -O6  -march=pentiumpro bug.cc 
bug.cc: In method `void Matrix3::diag (double)':
bug.cc:52: Internal error: Segmentation fault.
Please submit a full bug report.
See <URL:http://bugzilla.redhat.com/bugzilla/> for instructions.
 */

const int DIM=3;
class Vector3;
typedef double Real;
struct Matrix3
{
  Real elts_[3][3];

  void fill (Real);
  void diag (Real);



  void set_vectors (Vector3 const &va, Vector3 const &vb ,Vector3 const
&vc);
  Real operator ()(int i, int j) const { return elts_[i][j]; }
  Real &operator ()(int i, int j) { return elts_[i][j]; }
  Real trace () const;
  Real determinant () const;
  Real sub_determinant (int, int ) const;
  void print () const;
  Real max_norm () const;

  static void multiply (Matrix3 &dest, Matrix3 const&m1, Matrix3 const&m2);
  static void multiply (Matrix3 &dest, Real r, Matrix3 const&m2);
  static void substract (Matrix3 & dest, Matrix3 const &, Matrix3 const&);
  static void add (Matrix3 & dest, Matrix3 const &, Matrix3 const&);
  static void transpose_to (Matrix3 &dest, Matrix3 const&);
  static void invert_to (Matrix3 &dest, Matrix3 const&);
  static void multiply (Vector3 &dest, Matrix3 const &m, Vector3 const
&rhs);
  void set_rotate (int axis, Real angle);
  static void to_opengl_matrix (Real *rp, Matrix3 const&m);
  void operator *= (Real r);
  static Matrix3 rotate_about (Vector3, Real);
};


void
Matrix3::diag (Real r)
{
  for (int i=0; i < DIM; i++)
    for (int j=0; j < DIM; j++)
      elts_[i][j] = (i == j ? r :0);
}
Comment 1 Jakub Jelinek 2001-01-31 08:20:03 EST
This is the same bug as #24115 fixed in 2.96-71 and above.

*** This bug has been marked as a duplicate of 24115 ***

Note You need to log in before you can comment on or make changes to this bug.