cc1plus internal compiler error only when compiling with -g

Dan Glastonbury Dan.Glastonbury@adelaide.maptek.com.au
Fri Jul 24 00:13:00 GMT 1998


Following up to my own bug report, i've been performing some more 
investigations.

I've narrowed the code down to this.

Contents of tst3.C:
class first
{
  struct foo
  {
  };
  struct bar : public foo
  {
  }
  struct anotherStruct
  {
    void func(bar* parameter);
  };
  anotherStruct* aMember;  // This line kills gcc
};

I tried loading cc1plus into gdb-4.17 (gdb-4.16 doesn't find any debug symbols)
and tried running it.  Unfortunately gdb crashes.  Have I done something 
wrong?
>From the output of gcc -v I guessed that this is the way to run cc1plus.  
tst3.ii is the output of cpp.

dan@gauss[egcs-1.0.3a/objdir/gcc]> gdb-4.17 stage1/cc1obj 
GNU gdb 4.17
Copyright 1998 Free Software Foundation, Inc.
GDB is free software, covered by the GNU General Public License, and you are
welcome to change it and/or distribute copies of it under certain conditions.
Type "show copying" to see the conditions.
There is absolutely no warranty for GDB.  Type "show warranty" for details.
This GDB was configured as "mips-sgi-irix6.3"...set args
(gdb) 
set args
(gdb) set args /maptek/people/dan/tst3.ii -dumpbase tst3.cc -g -version -o 
/maptek/people/dan/tst3.s
set args /maptek/people/dan/tst3.ii -dumpbase tst3.cc -g -version -o /map
tek/people/dan/tst3.s
(gdb) break main
break main
During symbol reading, type qualifier 'const' ignored.
Breakpoint 1 at 0x10062444: file ../../gcc/toplev.c, line 3777.
(gdb) run
run
Starting program: /efs/zeeman/people/dan/building/egcs-1.0.3a/objdir/gcc/stage1
/cc1obj /maptek/people/dan/tst3.ii -dumpbase tst3.cc -g -version -o 
/maptek/people/dan/tst3.s
Trace/BPT trap (core dumped)

Are there any documents on how to debug gcc?

cheers
Dan

--
Dan Glastonbury <dglaston at iname.com>
`We gave you an atomic bomb, what do you want, mermaids?'
  -- I. I. Rabi to the Atomic Energy Commission





More information about the Gcc-bugs mailing list