public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c++/34336]  New: 4.2.2 internal error in stabilize_expr
@ 2007-12-04 17:52 gschrad at ll dot mit dot edu
  2007-12-04 17:59 ` [Bug c++/34336] " gschrad at ll dot mit dot edu
                   ` (10 more replies)
  0 siblings, 11 replies; 12+ messages in thread
From: gschrad at ll dot mit dot edu @ 2007-12-04 17:52 UTC (permalink / raw)
  To: gcc-bugs

The following error occurs while compiling template code (included as
error-4.2.2.ii at the tail of this report).

> $ g++ -c error-4.2.2.cc 
> error-4.2.2.cc: In constructor 'ClassC<DATATYPE>::ClassC()':
> error-4.2.2.cc:35: internal compiler error: in stabilize_expr, at cp/tree.c:2273
> Please submit a full bug report,
> with preprocessed source if appropriate.
> See <URL:http://gcc.gnu.org/bugs.html> for instructions.

The same error occurs reliably on both Linux/Intel and Solaris/Sparc

on Linux gcc -v produces:
> Using built-in specs.
> Target: i686-pc-linux-gnu
> Configured with: ../gcc-4.2.2/configure --enable-languages=c,c++ --prefix=/data/rosa2/build/gcc/ins-4.2.2-Linux-i686
> Thread model: posix
> gcc version 4.2.2

On Solaris gcc -v produces:
> Using built-in specs.
> Target: sparc-sun-solaris2.8
> Configured with: ../gcc-4.2.2/configure --prefix=/space/snail/gl17859/test-4.2.2/tools --with-threads=posix --with-as=/usr/ccs/bin/as --with-ld=/usr/ccs/bin/ld --enable-shared --with-cpu=v9 --enable-languages=c,c++
> Thread model: posix
> gcc version 4.2.2

Note that the error does not occur with gcc 4.1.0:
> Using built-in specs.
> Target: i686-pc-linux-gnu
> Configured with: ../gcc-4.0.1/configure --prefix=/tools/gcc-4.0.1 --disable-shared --enable-threads=posix --disable-checking --with-system-zlib --enable-__cxa_atexit --enable-languages=c,c++ --enable-version-specific-runtime-libs
> Thread model: posix
> gcc version 4.0.1

== error-4.2.2.ii

# 1 "error-4.2.2.cc"
# 1 "<built-in>"
# 1 "<command line>"
# 1 "error-4.2.2.cc"

class ClassA;

template <class T>
class SmartPtr
{
private:
    T* m_p;
public:

    T& operator*() { return *m_p; }
};

class ClassB
{
public:
    ClassB(const ClassA &);

};

template <class DATATYPE>
class ClassC
{
public:

    ClassC( );
private:

    SmartPtr<ClassA> m_xfr;
};

template <class DATATYPE>
ClassC<DATATYPE>::ClassC( )
{
    ClassB *sr = new ClassB(*m_xfr);
}


-- 
           Summary: 4.2.2 internal error in stabilize_expr
           Product: gcc
           Version: 4.2.2
            Status: UNCONFIRMED
          Severity: major
          Priority: P3
         Component: c++
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: gschrad at ll dot mit dot edu
 GCC build triplet: i686-pc-linux-gnu
  GCC host triplet: i686-pc-linux-gnu
GCC target triplet: i686-pc-linux-gnu


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


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

end of thread, other threads:[~2009-03-31  1:37 UTC | newest]

Thread overview: 12+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2007-12-04 17:52 [Bug c++/34336] New: 4.2.2 internal error in stabilize_expr gschrad at ll dot mit dot edu
2007-12-04 17:59 ` [Bug c++/34336] " gschrad at ll dot mit dot edu
2007-12-04 18:11 ` pinskia at gcc dot gnu dot org
2007-12-04 18:15 ` pinskia at gcc dot gnu dot org
2007-12-04 20:19 ` [Bug c++/34336] [4.2/4.3 Regression] " rguenth at gcc dot gnu dot org
2007-12-05  6:48 ` fang at csl dot cornell dot edu
2007-12-05 17:01 ` jakub at gcc dot gnu dot org
2007-12-06  9:33 ` jakub at gcc dot gnu dot org
2007-12-06  9:54 ` [Bug c++/34336] [4.2 " jakub at gcc dot gnu dot org
2008-02-01 17:02 ` jsm28 at gcc dot gnu dot org
2008-05-19 20:31 ` jsm28 at gcc dot gnu dot org
2009-03-31  1:37 ` jsm28 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).