internal gcc error

Matthias Meixner meixner@rbg.informatik.tu-darmstadt.de
Wed Apr 5 07:29:00 GMT 2000


Hello,

compiling the following short program gives an internal error:
$ gcc -v
Reading specs from /opt/gnu/lib/gcc-lib/i686-pc-linux-gnu/2.96/specs
gcc version 2.96 20000320 (experimental)
$ gcc t5.cxx
t5.cxx: In function `int main ()':
t5.cxx:31: Internal compiler error.
t5.cxx:31: Please submit a full bug report.
t5.cxx:31: See <URL: http://www.gnu.org/software/gcc/bugs.html > for
t5.cxx:31: instructions.

Regards,

	Matthias Meixner

--------------------------------------------------


struct Z { Z(){} };

struct A {
   Z x;

   operator Z *() { return &x; }
   operator const Z *() { return &x; }
   operator const Z *() const { return &x; }
};

struct B {
   Z x;
   
   operator Z &() { return x; }
  // operator const Z &() { return x; }
   operator const Z &() const { return x; }
};

main()
{
   A a;
   const A ca;
   Z *a1=a;
   const Z *a2=a;
   const Z *a3=ca;

   B b;
   const B cb;
   Z &b1=b;
   const Z &b2=b;
   const Z &b3=cb;
}


-- 
Matthias Meixner                   meixner@rbg.informatik.tu-darmstadt.de
Technische Universität Darmstadt
Rechnerbetriebsgruppe                          Telefon (+49) 6151 16 6670
Wilhelminenstraße 7, D-64283 Darmstadt, Germany    Fax (+49) 6151 16 4701


More information about the Gcc-bugs mailing list