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]

option conflict in g++(2.95.2) - linux-i386-elf


Problem: sometimes option -ggdb will crash the compiler

change the "FIX"-Define in "konto.cpp" to see some workarounds

GCC version: gcc version 2.95.2 19991024 (release)
system: i586-redhat6.2
g++ options: g++ -g -ggdb -c konto.cpp

c++ source: see attachment - konto.cpp
stdout output: see attachment - stdout.output
preproc. output: see attachment - konto.ii

CU Andi.

-- 
-*-*-*-*-*-*-*- Andreas Beeker -*-*-*-*-*-*-*-
Am Schwanenplatz 1      Tel. +49 (0) 8681 281
D-83329 Waging am See   Fax. +49 (0) 8681 4276
                                         __O
djc@fh-rosenheim.de                    _/\_\,
www.fh-rosenheim.de/~djc              (*)/ (*)
www.chiemgau.com/schwanenplatz
PGP: www.fh-rosenheim.de/~djc/pubring.gpg
----------------------------------------------

As long as there are ill-defined goals, bizarre bugs, and
unrealistic schedules, there will be Real Programmers
willing to jump in and Solve The Problem, saving the
documentation for later.
/* use FIX 1..3 to get no errors */
#define FIX 0

class MetaInfo
{
  protected:
   MetaInfo();

#if FIX != 1
   // fix: don't declare a destructor 
   ~MetaInfo();
#endif
};


class Meta
{
  public:
   // Con-/Destructor
   Meta(MetaInfo& metainfo);
};

class KontoInfo : public MetaInfo
{
 public:
  static KontoInfo& getSingelton()
#if FIX == 2
  ;
#else
  {
	 static KontoInfo k;
	 return k;
  }
#endif

 private:
  KontoInfo() {}
};


/* fix: write the static class-function in different c++-file */
#if FIX == 2
KontoInfo& KontoInfo::getSingelton()
{
   static KontoInfo k;
   return k;
}
#endif


class Konto : public Meta
{
  public:
#if FIX == 3
   // another fix: write it within the class Definition
   Konto() : Meta(KontoInfo::getSingelton()) {}
#else
   Konto();
#endif
};

#if FIX != 3
Konto::Konto() : Meta(KontoInfo::getSingelton()) {}
#endif
# 1 "konto.cpp"
 


class MetaInfo
{
  protected:
   MetaInfo();


    
   ~MetaInfo();

};


class Meta
{
  public:
    
   Meta(MetaInfo& metainfo);
};

class KontoInfo : public MetaInfo
{
 public:
  static KontoInfo& getSingelton()



  {
	 static KontoInfo k;
	 return k;
  }


 private:
  KontoInfo() {}
};


 









class Konto : public Meta
{
  public:




   Konto();

};


Konto::Konto() : Meta(KontoInfo::getSingelton()) {}

Reading specs from /usr/local/lib/gcc-lib/i586-pc-linux-gnu/2.95.2/specs
gcc version 2.95.2 19991024 (release)
 /usr/local/lib/gcc-lib/i586-pc-linux-gnu/2.95.2/cpp -lang-c++ -v -D__GNUC__=2 -D__GNUG__=2 -D__GNUC_MINOR__=95 -D__cplusplus -D__ELF__ -Dunix -D__i386__ -Dlinux -D__ELF__ -D__unix__ -D__i386__ -D__linux__ -D__unix -D__linux -Asystem(posix) -D__EXCEPTIONS -g -ggdb -Acpu(i386) -Amachine(i386) -Di386 -D__i386 -D__i386__ -Di586 -Dpentium -D__i586 -D__i586__ -D__pentium -D__pentium__ konto.cpp konto.ii
GNU CPP version 2.95.2 19991024 (release) (i386 Linux/ELF)
#include "..." search starts here:
#include <...> search starts here:
 /usr/lib/qt-2.1.0/include
 /usr/lib/qt-2.1.0/include
 /usr/lib/qt-2.1.0/include
 /usr/lib/qt-2.1.0/include
 /usr/local/lib/gcc-lib/i586-pc-linux-gnu/2.95.2/include/g++
 /usr/local/include
 /usr/local/lib/gcc-lib/i586-pc-linux-gnu/2.95.2/../../../../i586-pc-linux-gnu/include
 /usr/local/lib/gcc-lib/i586-pc-linux-gnu/2.95.2/include
 /usr/include
End of search list.
The following default directories have been omitted from the search path:
 
End of omitted list.
 /usr/local/lib/gcc-lib/i586-pc-linux-gnu/2.95.2/cc1plus konto.ii -quiet -dumpbase konto.cc -g -ggdb -version -o konto.s
GNU C++ version 2.95.2 19991024 (release) (i586-pc-linux-gnu) compiled by GNU C version 2.95.2 19991024 (release).
konto.cpp:64: Internal compiler error in `output_die', at dwarf2out.c:5426
Please submit a full bug report.
See <URL:http://www.gnu.org/software/gcc/faq.html#bugreport> for instructions.

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