public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c++/14659] New: segfault with const enum in templated class
@ 2004-03-19 21:39 wsf at fultondesigns dot co dot uk
  2004-03-19 21:41 ` [Bug c++/14659] " wsf at fultondesigns dot co dot uk
  2004-03-19 21:50 ` pinskia at gcc dot gnu dot org
  0 siblings, 2 replies; 3+ messages in thread
From: wsf at fultondesigns dot co dot uk @ 2004-03-19 21:39 UTC (permalink / raw)
  To: gcc-bugs

$ 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


^ permalink raw reply	[flat|nested] 3+ messages in thread

* [Bug c++/14659] segfault with const enum in templated class
  2004-03-19 21:39 [Bug c++/14659] New: segfault with const enum in templated class wsf at fultondesigns dot co dot uk
@ 2004-03-19 21:41 ` wsf at fultondesigns dot co dot uk
  2004-03-19 21:50 ` pinskia at gcc dot gnu dot org
  1 sibling, 0 replies; 3+ messages in thread
From: wsf at fultondesigns dot co dot uk @ 2004-03-19 21:41 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From wsf at fultondesigns dot co dot uk  2004-03-19 21:41 -------
Note that the 'cat' command split the long line in gccbug.cxx. Please rejoin
when testing.

-- 


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


^ permalink raw reply	[flat|nested] 3+ messages in thread

* [Bug c++/14659] segfault with const enum in templated class
  2004-03-19 21:39 [Bug c++/14659] New: segfault with const enum in templated class wsf at fultondesigns dot co dot uk
  2004-03-19 21:41 ` [Bug c++/14659] " wsf at fultondesigns dot co dot uk
@ 2004-03-19 21:50 ` pinskia at gcc dot gnu dot org
  1 sibling, 0 replies; 3+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2004-03-19 21:50 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From pinskia at gcc dot gnu dot org  2004-03-19 21:50 -------
Confirmed in all recent (the last 5 years) versions of gcc from 2.95.3 until 3.4.0. So closing as fixed for 
3.4.0.

-- 
           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |RESOLVED
           Keywords|                            |ice-on-valid-code
      Known to fail|                            |2.95.3 3.3.1 3.0.4 3.4.0
                   |                            |3.5.0
      Known to work|                            |3.4.0 3.5.0
         Resolution|                            |FIXED
   Target Milestone|---                         |3.4.0


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


^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2004-03-19 21:50 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2004-03-19 21:39 [Bug c++/14659] New: segfault with const enum in templated class wsf at fultondesigns dot co dot uk
2004-03-19 21:41 ` [Bug c++/14659] " wsf at fultondesigns dot co dot uk
2004-03-19 21:50 ` pinskia at gcc dot gnu dot org

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).