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

* [Bug c++/34336] 4.2.2 internal error in stabilize_expr
  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 ` gschrad at ll dot mit dot edu
  2007-12-04 18:11 ` pinskia at gcc dot gnu dot org
                   ` (9 subsequent siblings)
  10 siblings, 0 replies; 12+ messages in thread
From: gschrad at ll dot mit dot edu @ 2007-12-04 17:59 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #1 from gschrad at ll dot mit dot edu  2007-12-04 17:59 -------
Created an attachment (id=14698)
 --> (http://gcc.gnu.org/bugzilla/attachment.cgi?id=14698&action=view)
Preprocessed source of the case that causes the error


-- 


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


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

* [Bug c++/34336] 4.2.2 internal error in stabilize_expr
  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
                   ` (8 subsequent siblings)
  10 siblings, 0 replies; 12+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2007-12-04 18:11 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #2 from pinskia at gcc dot gnu dot org  2007-12-04 18:10 -------
With checking on the trunk we get this ICE:
error-4.2.2.cc: In constructor 'ClassC<DATATYPE>::ClassC()':
error-4.2.2.cc:35: internal compiler error: tree check: expected target_expr,
have non_dependent_expr in stabilize_expr, at cp/tree.c:2565
Please submit a full bug report,
with preprocessed source if appropriate.
See <http://gcc.gnu.org/bugs.html> for instructions.


-- 


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


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

* [Bug c++/34336] 4.2.2 internal error in stabilize_expr
  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
                   ` (7 subsequent siblings)
  10 siblings, 0 replies; 12+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2007-12-04 18:15 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #3 from pinskia at gcc dot gnu dot org  2007-12-04 18:15 -------
We have:
<<< Unknown tree: non_dependent_expr
  *((struct ClassC *) this)->m_xfr >>>


Which means we are missing a TARGET_EXPR or we are trying to stabilize the
expression too early.


-- 


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


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

* [Bug c++/34336] [4.2/4.3 Regression] 4.2.2 internal error in stabilize_expr
  2007-12-04 17:52 [Bug c++/34336] New: 4.2.2 internal error in stabilize_expr gschrad at ll dot mit dot edu
                   ` (2 preceding siblings ...)
  2007-12-04 18:15 ` pinskia at gcc dot gnu dot org
@ 2007-12-04 20:19 ` rguenth at gcc dot gnu dot org
  2007-12-05  6:48 ` fang at csl dot cornell dot edu
                   ` (6 subsequent siblings)
  10 siblings, 0 replies; 12+ messages in thread
From: rguenth at gcc dot gnu dot org @ 2007-12-04 20:19 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #4 from rguenth at gcc dot gnu dot org  2007-12-04 20:19 -------
Confirmed.


-- 

rguenth at gcc dot gnu dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |NEW
     Ever Confirmed|0                           |1
           Keywords|                            |ice-on-valid-code
      Known to fail|                            |4.2.2 4.3.0
      Known to work|                            |4.1.3 4.3.0
   Last reconfirmed|0000-00-00 00:00:00         |2007-12-04 20:19:37
               date|                            |
            Summary|4.2.2 internal error in     |[4.2/4.3 Regression] 4.2.2
                   |stabilize_expr              |internal error in
                   |                            |stabilize_expr
   Target Milestone|---                         |4.2.3


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


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

* [Bug c++/34336] [4.2/4.3 Regression] 4.2.2 internal error in stabilize_expr
  2007-12-04 17:52 [Bug c++/34336] New: 4.2.2 internal error in stabilize_expr gschrad at ll dot mit dot edu
                   ` (3 preceding siblings ...)
  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
                   ` (5 subsequent siblings)
  10 siblings, 0 replies; 12+ messages in thread
From: fang at csl dot cornell dot edu @ 2007-12-05  6:48 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #5 from fang at csl dot cornell dot edu  2007-12-05 06:48 -------
(I believe 4.3.0 was accidentally listed under known-to-work.)


-- 

fang at csl dot cornell dot edu changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |fang at csl dot cornell dot
                   |                            |edu


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


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

* [Bug c++/34336] [4.2/4.3 Regression] 4.2.2 internal error in stabilize_expr
  2007-12-04 17:52 [Bug c++/34336] New: 4.2.2 internal error in stabilize_expr gschrad at ll dot mit dot edu
                   ` (4 preceding siblings ...)
  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
                   ` (4 subsequent siblings)
  10 siblings, 0 replies; 12+ messages in thread
From: jakub at gcc dot gnu dot org @ 2007-12-05 17:01 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #6 from jakub at gcc dot gnu dot org  2007-12-05 17:01 -------
Testing a fix.


-- 

jakub at gcc dot gnu dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
         AssignedTo|unassigned at gcc dot gnu   |jakub at gcc dot gnu dot org
                   |dot org                     |
             Status|NEW                         |ASSIGNED
   Last reconfirmed|2007-12-04 20:19:37         |2007-12-05 17:01:14
               date|                            |


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


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

* [Bug c++/34336] [4.2/4.3 Regression] 4.2.2 internal error in stabilize_expr
  2007-12-04 17:52 [Bug c++/34336] New: 4.2.2 internal error in stabilize_expr gschrad at ll dot mit dot edu
                   ` (5 preceding siblings ...)
  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
                   ` (3 subsequent siblings)
  10 siblings, 0 replies; 12+ messages in thread
From: jakub at gcc dot gnu dot org @ 2007-12-06  9:33 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #7 from jakub at gcc dot gnu dot org  2007-12-06 09:33 -------
Subject: Bug 34336

Author: jakub
Date: Thu Dec  6 09:33:26 2007
New Revision: 130645

URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=130645
Log:
        PR c++/34336
        * tree.c (stabilize_call, stabilize_init): Do nothing if
        processing_template_decl.

        * g++.dg/template/new8.C: New test.

Added:
    trunk/gcc/testsuite/g++.dg/template/new8.C
Modified:
    trunk/gcc/cp/ChangeLog
    trunk/gcc/cp/tree.c
    trunk/gcc/testsuite/ChangeLog


-- 


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


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

* [Bug c++/34336] [4.2 Regression] 4.2.2 internal error in stabilize_expr
  2007-12-04 17:52 [Bug c++/34336] New: 4.2.2 internal error in stabilize_expr gschrad at ll dot mit dot edu
                   ` (6 preceding siblings ...)
  2007-12-06  9:33 ` jakub at gcc dot gnu dot org
@ 2007-12-06  9:54 ` jakub at gcc dot gnu dot org
  2008-02-01 17:02 ` jsm28 at gcc dot gnu dot org
                   ` (2 subsequent siblings)
  10 siblings, 0 replies; 12+ messages in thread
From: jakub at gcc dot gnu dot org @ 2007-12-06  9:54 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #8 from jakub at gcc dot gnu dot org  2007-12-06 09:54 -------
Fixed on the trunk.


-- 

jakub at gcc dot gnu dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
      Known to fail|4.2.2 4.3.0                 |4.2.2
            Summary|[4.2/4.3 Regression] 4.2.2  |[4.2 Regression] 4.2.2
                   |internal error in           |internal error in
                   |stabilize_expr              |stabilize_expr


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


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

* [Bug c++/34336] [4.2 Regression] 4.2.2 internal error in stabilize_expr
  2007-12-04 17:52 [Bug c++/34336] New: 4.2.2 internal error in stabilize_expr gschrad at ll dot mit dot edu
                   ` (7 preceding siblings ...)
  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
  10 siblings, 0 replies; 12+ messages in thread
From: jsm28 at gcc dot gnu dot org @ 2008-02-01 17:02 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #9 from jsm28 at gcc dot gnu dot org  2008-02-01 16:55 -------
4.2.3 is being released now, changing milestones of open bugs to 4.2.4.


-- 

jsm28 at gcc dot gnu dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
   Target Milestone|4.2.3                       |4.2.4


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


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

* [Bug c++/34336] [4.2 Regression] 4.2.2 internal error in stabilize_expr
  2007-12-04 17:52 [Bug c++/34336] New: 4.2.2 internal error in stabilize_expr gschrad at ll dot mit dot edu
                   ` (8 preceding siblings ...)
  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
  10 siblings, 0 replies; 12+ messages in thread
From: jsm28 at gcc dot gnu dot org @ 2008-05-19 20:31 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #10 from jsm28 at gcc dot gnu dot org  2008-05-19 20:23 -------
4.2.4 is being released, changing milestones to 4.2.5.


-- 

jsm28 at gcc dot gnu dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
   Target Milestone|4.2.4                       |4.2.5


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


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

* [Bug c++/34336] [4.2 Regression] 4.2.2 internal error in stabilize_expr
  2007-12-04 17:52 [Bug c++/34336] New: 4.2.2 internal error in stabilize_expr gschrad at ll dot mit dot edu
                   ` (9 preceding siblings ...)
  2008-05-19 20:31 ` jsm28 at gcc dot gnu dot org
@ 2009-03-31  1:37 ` jsm28 at gcc dot gnu dot org
  10 siblings, 0 replies; 12+ messages in thread
From: jsm28 at gcc dot gnu dot org @ 2009-03-31  1:37 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #11 from jsm28 at gcc dot gnu dot org  2009-03-31 01:37 -------
Closing 4.2 branch, fixed in 4.3.


-- 

jsm28 at gcc dot gnu dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|ASSIGNED                    |RESOLVED
      Known to fail|4.2.2                       |4.2.2 4.2.5
         Resolution|                            |FIXED
   Target Milestone|4.2.5                       |4.3.0


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).