gcc 3.0 vs blitz-20001213

Peter Schmid schmid@snake.iap.physik.tu-darmstadt.de
Tue Jun 5 17:33:00 GMT 2001


After applying this patch 
*** ./blitz/array/cgsolve.h~	Mon Jun 19 14:26:15 2000
--- ./blitz/array/cgsolve.h	Tue Jun  5 06:22:27 2001
*************** void dump(const char* name, Array<T_numt
*** 15,21 ****
          for (int k=A.lbound(2); k <= A.ubound(2); ++k)
          {
              T_numtype tmp = A(i,j,k);
!             normA += ::fabs(tmp);
          }
        }
      }
--- 15,21 ----
          for (int k=A.lbound(2); k <= A.ubound(2); ++k)
          {
              T_numtype tmp = A(i,j,k);
!             normA += std::fabs(tmp);
          }
        }
      }
*** ./random/mt.h~	Mon Jun 19 14:26:20 2000
--- ./random/mt.h	Tue Jun  5 06:50:19 2001
*************** enum { N = 624, PF = 397, reference_seed
*** 95,101 ****
    void initialize()
    {
      S.resize(N);
!     I = &S[N];
    }
   
  public: 
--- 95,101 ----
    void initialize()
    {
      S.resize(N);
!     I = S.end();
    }
   
  public: 
*************** public: 
*** 132,138 ****
  
      enum { Knuth_A = 69069 }; 
      twist_int x = seed & 0xFFFFFFFF;
!     Iter s = &S[0];
      twist_int mask = (seed == reference_seed) ? 0 : 0xFFFFFFFF;
      for (int j = 0; j < N; ++j) {
        // adding j here avoids the risk of all zeros 
--- 132,138 ----
  
      enum { Knuth_A = 69069 }; 
      twist_int x = seed & 0xFFFFFFFF;
!     Iter s = S.begin();
      twist_int mask = (seed == reference_seed) ? 0 : 0xFFFFFFFF;
      for (int j = 0; j < N; ++j) {
        // adding j here avoids the risk of all zeros 
*************** public: 
*** 150,167 ****
      // before the constructor.  See the note above about static
      // initialization.
  
!     Iter p0 = &S[0];
      Iter pM = p0 + PF;
      BitMixer twist;
      twist (S[0]); // prime the pump
!     for (Iter pf_end = &S[N-PF]; p0 != pf_end; ++p0, ++pM)
        *p0 = *pM ^ twist (p0[1]);
      pM = S.begin();
!     for (Iter s_end = &S[N-1]; p0 != s_end; ++p0, ++pM)
        *p0 = *pM ^ twist (p0[1]);
      *p0 = *pM ^ twist (S[0]);
  
!     I = &S[0];
    }
  
    inline twist_int random (void)
--- 150,167 ----
      // before the constructor.  See the note above about static
      // initialization.
  
!     Iter p0 = S.begin();
      Iter pM = p0 + PF;
      BitMixer twist;
      twist (S[0]); // prime the pump
!     for (Iter pf_end = S.end() - PF; p0 != pf_end; ++p0, ++pM)
        *p0 = *pM ^ twist (p0[1]);
      pM = S.begin();
!     for (Iter s_end = S.end() - 1; p0 != s_end; ++p0, ++pM)
        *p0 = *pM ^ twist (p0[1]);
      *p0 = *pM ^ twist (S[0]);
  
!     I = S.begin();
    }
  
    inline twist_int random (void)

to blitz 20001213, gcc version 3.0 20010604 compiles every source
file without a problem and all tests of the testsuite pass on
i686-pc-linux-gnu. All programs of the examples directory compile and
run successfully, as far as I can tell (no core dumps).   

I have been trying to compile blitz for a long time and this is the
first time that gcc can compile every single source file and that all tests
pass. 

Thank you for making this possible.

Hope this helps,

Peter Schmid



More information about the Libstdc++ mailing list