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


Hello--
   The following code causes an internal compiler error on Irix 6.2
when the optimizer setting is not zero.  Info submitted as requested.

   Observation...the same error occurs on an HP platform:
gcc -v
Reading specs from /usr/local/lib/gcc-lib/hppa1.1-hp-hpux10.20/egcs-2.91.66/specs
gcc version egcs-2.91.66 19990314 (egcs-1.1.2 release)

   but it does NOT occur on an old RS6000 platform:
gcc -v
Reading specs from /usr/local/lib/gcc-lib/rs6000-ibm-aix3.2.5/egcs-2.91.66/specs
gcc version egcs-2.91.66 19990314 (egcs-1.1.2 release)

--Alex Z.

Command: gcc -v --save-temps -c -O3 -I../../src ornj.cpp 2>&1 > out

+++ contents of out +++
Reading specs from /usr/local/lib/gcc-lib/mips-sgi-irix6.2/egcs-2.91.66/specs
gcc version egcs-2.91.66 19990314 (egcs-1.1.2 release)
 /usr/local/lib/gcc-lib/mips-sgi-irix6.2/egcs-2.91.66/cpp -lang-c++ -v -I../../src -undef -D__GNUC__=2 -D__GNUG__=2 -D__cplusplus -D__GNUC_MINOR__=91 -Dunix -Dmips -Dsgi -Dhost_mips -DMIPSEB -D_MIPSEB -DSYSTYPE_SVR4 -D_LONGLONG -D_SVR4_SOURCE -D_MODERN_C 
-D__DSO__ -D__unix__ -D__mips__ -D__sgi__ -D__host_mips__ -D__MIPSEB__ -D_MIPSEB -D__SYSTYPE_SVR4__ -D_LONGLONG -D_SVR4_SOURCE -D_MODERN_C -D__DSO__ -D__unix -D__mips -D__sgi -D__host_mips -D__MIPSEB -D__SYSTYPE_SVR4 -Asystem(unix) -Asystem(svr4) -Acpu(mi
ps) -Amachine(sgi) -D__EXCEPTIONS -D__CHAR_UNSIGNED__ -D__OPTIMIZE__ -D__LANGUAGE_C -D_LANGUAGE_C -DLANGUAGE_C -D__SIZE_TYPE__=unsigned int -D__PTRDIFF_TYPE__=int -D__EXTENSIONS__ -D_SGI_SOURCE -D_MIPS_FPSET=32 -D_MIPS_ISA=_MIPS_ISA_MIPS3 -D_ABIN32=2 -D_M
IPS_SIM=_ABIN32 -D_MIPS_SZINT=32 -D_MIPS_SZLONG=32 -D_MIPS_SZPTR=32 -D_COMPILER_VERSION=601 -U__mips -D__mips=3 -D__mips64 ornj.cpp ornj.ii
GNU CPP version egcs-2.91.66 19990314 (egcs-1.1.2 release) [AL 1.1, MM 40] SGI running IRIX 6.x
#include "..." search starts here:
#include <...> search starts here:
 ../../src
 /usr/local/lib/gcc-lib/mips-sgi-irix6.2/egcs-2.91.66/include/g++
 /usr/local/include
 /usr/local/mips-sgi-irix6.2/include
 /usr/local/lib/gcc-lib/mips-sgi-irix6.2/egcs-2.91.66/include
 /usr/include
End of search list.
 /usr/local/lib/gcc-lib/mips-sgi-irix6.2/egcs-2.91.66/cc1plus ornj.ii -quiet -dumpbase ornj.cc -O3 -version -o ornj.s
GNU C++ version egcs-2.91.66 19990314 (egcs-1.1.2 release) (mips-sgi-irix6.2) compiled by GNU C version 2.8.1.
ornj.cpp: In function `void optimizerBug(struct future_path_entry *)':
ornj.cpp:69: Internal compiler error.
ornj.cpp:69: Please submit a full bug report to `egcs-bugs@egcs.cygnus.com'.
ornj.cpp:69: See <URL:http://egcs.cygnus.com/faq.html#bugreport> for details.

+++ contents of ornj.ii +++
# 1 "ornj.cpp"
class DVector {

   public:
      DVector() { ftX = 0.0; ftY = 0.0; ftZ = 0.0; }

      double Getx() const { return(ftX); }
      double Gety() const { return(ftY); }
      double Getz() const { return(ftZ); }
                
      DVector& operator = (const DVector InV) {
         ftX = InV.Getx();
         ftY = InV.Gety();
         ftZ = InV.Getz();
         return(*this);
      } 

   private:
      double   ftX, ftY, ftZ;
};

struct sdb_path_pt {
   long PosFlag,
        etc;
};

struct future_path_entry {
   DVector  pos;
   long  Next;
   sdb_path_pt *pSDBPoint;
};

void optimizerBug(
   future_path_entry *FirstOB
) {
    
   enum { agl_off, agl_on };   
   long agl_status;
   double zpre, zc, aglmin;
   future_path_entry *StartOB, *EndOB, *InterOB,
                     *TravOB, *TwoOB, *OneOB, *GrndOB;
   sdb_path_pt *EndSDB;
   DVector InterV, ParntV;

   GrndOB = OneOB = TwoOB = TravOB = 0;
   InterV = ParntV;
   StartOB = FirstOB;
   EndOB = (future_path_entry *) StartOB->Next;
   EndSDB = StartOB->pSDBPoint;
   InterOB = 0;

   while(InterOB != EndOB) {

       
      switch(EndSDB->PosFlag / 1000000 % 10) {
      case 1:
         agl_status = agl_on;
         if(aglmin > EndOB->pos.Getz()) {
            zpre = zc + aglmin;
         } else {
            zpre = zc + EndOB->pos.Getz();
         }
         break;
      case 2:
         agl_status = agl_off;
         zpre = EndOB->pos.Getz();
         break;
      }
   }
}


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