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]
Other format: [Raw text]

[Bug c++/14659] New: segfault with const enum in templated class


$ cat gccbug.cxx

  template<typename T> struct TClass {
    enum scientists { faraday, bell };
  };

  template<typename T> struct TDerivedClass : TClass<T> {
    const enum TClass<T>::scientists        scientistsNameTest8(const enum TClas

s<T>::scientists e) { return e; }
  };


$ gcc -v -save-temps gccbug.cxx
Reading specs from /usr/lib/gcc-lib/i686-pc-cygwin/3.3.1/specs
Configured with: /GCC/gcc-3.3.1-3/configure --with-gcc --with-gnu-ld --with-gnu-
as --prefix=/usr --exec-prefix=/usr --sysconfdir=/etc --libdir=/usr/lib --libexe
cdir=/usr/sbin --mandir=/usr/share/man --infodir=/usr/share/info --enable-langua
ges=c,ada,c++,f77,pascal,java,objc --enable-libgcj --enable-threads=posix --with
-system-zlib --enable-nls --without-included-gettext --enable-interpreter --enab
le-sjlj-exceptions --disable-version-specific-runtime-libs --enable-shared --dis
able-win32-registry --enable-java-gc=boehm --disable-hash-synchronization --verb
ose --target=i686-pc-cygwin --host=i686-pc-cygwin --build=i686-pc-cygwin
Thread model: posix
gcc version 3.3.1 (cygming special)
 /usr/lib/gcc-lib/i686-pc-cygwin/3.3.1/cc1plus.exe -E -D__GNUG__=3 -quiet -v -D_
_GNUC__=3 -D__GNUC_MINOR__=3 -D__GNUC_PATCHLEVEL__=1 -D__CYGWIN32__ -D__CYGWIN__
 -Dunix -D__unix__ -D__unix -idirafter /usr/lib/gcc-lib/i686-pc-cygwin/3.3.1/../
../../../include/w32api -idirafter /usr/lib/gcc-lib/i686-pc-cygwin/3.3.1/../../.
./../i686-pc-cygwin/lib/../../include/w32api gccbug.cxx gccbug.ii
ignoring nonexistent directory "/usr/local/include"
ignoring nonexistent directory "/usr/i686-pc-cygwin/include"
ignoring duplicate directory "/usr/i686-pc-cygwin/lib/../../include/w32api"
#include "..." search starts here:
#include <...> search starts here:
 /usr/include/c++/3.3.1
 /usr/include/c++/3.3.1/i686-pc-cygwin
 /usr/include/c++/3.3.1/backward
 /usr/lib/gcc-lib/i686-pc-cygwin/3.3.1/include
 /usr/include
 /usr/include/w32api
End of search list.
 /usr/lib/gcc-lib/i686-pc-cygwin/3.3.1/cc1plus.exe -fpreprocessed gccbug.ii -qui
et -dumpbase gccbug.cxx -auxbase gccbug -version -o gccbug.s
GNU C++ version 3.3.1 (cygming special) (i686-pc-cygwin)
        compiled by GNU C version 3.3.1 (cygming special).
GGC heuristics: --param ggc-min-expand=47 --param ggc-min-heapsize=32699
gccbug.cxx:7: warning: `enum TClass<T>::scientists' declares a new type at
   namespace scope
gccbug.cxx:7: warning:   names from dependent base classes are not visible to
   unqualified name lookup - to refer to the inherited type, say `enum
   TDerivedClass::scientists'
gccbug.cxx:7: internal compiler error: Segmentation fault
Please submit a full bug report,
with preprocessed source if appropriate.
See <URL:http://gcc.gnu.org/bugs.html> for instructions.

$

-- 
           Summary: segfault with const enum in templated class
           Product: gcc
           Version: 3.3.1
            Status: UNCONFIRMED
          Severity: normal
          Priority: P2
         Component: c++
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: wsf at fultondesigns dot co dot uk
                CC: gcc-bugs at gcc dot gnu dot org


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=14659


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