public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c++/40139] [4.4/4.5 Regression] ICE on inavlid use of destructor
  2009-05-14  7:11 [Bug c++/40139] New: [4.4/4.5 Regression] ICE on inavlid use of destructor reichelt at gcc dot gnu dot org
@ 2009-05-14  7:11 ` reichelt at gcc dot gnu dot org
  2009-05-14  9:19 ` [Bug c++/40139] [4.4/4.5 Regression] ICE on invalid " rguenth at gcc dot gnu dot org
                   ` (6 subsequent siblings)
  7 siblings, 0 replies; 9+ messages in thread
From: reichelt at gcc dot gnu dot org @ 2009-05-14  7:11 UTC (permalink / raw)
  To: gcc-bugs



-- 

reichelt at gcc dot gnu dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
   Target Milestone|---                         |4.4.1


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


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

* [Bug c++/40139]  New: [4.4/4.5 Regression] ICE on inavlid use of destructor
@ 2009-05-14  7:11 reichelt at gcc dot gnu dot org
  2009-05-14  7:11 ` [Bug c++/40139] " reichelt at gcc dot gnu dot org
                   ` (7 more replies)
  0 siblings, 8 replies; 9+ messages in thread
From: reichelt at gcc dot gnu dot org @ 2009-05-14  7:11 UTC (permalink / raw)
  To: gcc-bugs

The following invalid code snippet triggers an ICE since GCC 4.4.0:

===========================================
template<int> struct A
{
  static int i;
};

template<int N> int A<N>::i = { A::~A };

template class A<0>;
===========================================

bug.cc: In instantiation of 'int A<0>::i':
bug.cc:8:   instantiated from here
bug.cc:6: internal compiler error: Segmentation fault
Please submit a full bug report, [etc.]


-- 
           Summary: [4.4/4.5 Regression] ICE on inavlid use of destructor
           Product: gcc
           Version: 4.5.0
            Status: UNCONFIRMED
          Keywords: ice-on-invalid-code, monitored
          Severity: normal
          Priority: P3
         Component: c++
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: reichelt at gcc dot gnu dot org


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


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

* [Bug c++/40139] [4.4/4.5 Regression] ICE on invalid use of destructor
  2009-05-14  7:11 [Bug c++/40139] New: [4.4/4.5 Regression] ICE on inavlid use of destructor reichelt at gcc dot gnu dot org
  2009-05-14  7:11 ` [Bug c++/40139] " reichelt at gcc dot gnu dot org
@ 2009-05-14  9:19 ` rguenth at gcc dot gnu dot org
  2009-05-14 16:46 ` jakub at gcc dot gnu dot org
                   ` (5 subsequent siblings)
  7 siblings, 0 replies; 9+ messages in thread
From: rguenth at gcc dot gnu dot org @ 2009-05-14  9:19 UTC (permalink / raw)
  To: gcc-bugs



-- 

rguenth at gcc dot gnu dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
           Priority|P3                          |P2


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


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

* [Bug c++/40139] [4.4/4.5 Regression] ICE on invalid use of destructor
  2009-05-14  7:11 [Bug c++/40139] New: [4.4/4.5 Regression] ICE on inavlid use of destructor reichelt at gcc dot gnu dot org
  2009-05-14  7:11 ` [Bug c++/40139] " reichelt at gcc dot gnu dot org
  2009-05-14  9:19 ` [Bug c++/40139] [4.4/4.5 Regression] ICE on invalid " rguenth at gcc dot gnu dot org
@ 2009-05-14 16:46 ` jakub at gcc dot gnu dot org
  2009-05-15 10:06 ` jakub at gcc dot gnu dot org
                   ` (4 subsequent siblings)
  7 siblings, 0 replies; 9+ messages in thread
From: jakub at gcc dot gnu dot org @ 2009-05-14 16:46 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #1 from jakub at gcc dot gnu dot org  2009-05-14 16:45 -------
Regressed with r145508 (PR39608).


-- 

jakub at gcc dot gnu dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |NEW
     Ever Confirmed|0                           |1
   Last reconfirmed|0000-00-00 00:00:00         |2009-05-14 16:45:48
               date|                            |


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


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

* [Bug c++/40139] [4.4/4.5 Regression] ICE on invalid use of destructor
  2009-05-14  7:11 [Bug c++/40139] New: [4.4/4.5 Regression] ICE on inavlid use of destructor reichelt at gcc dot gnu dot org
                   ` (2 preceding siblings ...)
  2009-05-14 16:46 ` jakub at gcc dot gnu dot org
@ 2009-05-15 10:06 ` jakub at gcc dot gnu dot org
  2009-05-16 22:38 ` jason at gcc dot gnu dot org
                   ` (3 subsequent siblings)
  7 siblings, 0 replies; 9+ messages in thread
From: jakub at gcc dot gnu dot org @ 2009-05-15 10:06 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #2 from jakub at gcc dot gnu dot org  2009-05-15 10:06 -------
Particularly the dependent_type_p -> dependent_scope_p change in
finish_id_expression makes the difference here.  BIT_NOT_EXPR of a RECORD_TYPE
makes it through till tsubsting and isn't errored as invalid use of destructor
in that case.


-- 

jakub at gcc dot gnu dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |jason at gcc dot gnu dot org


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


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

* [Bug c++/40139] [4.4/4.5 Regression] ICE on invalid use of destructor
  2009-05-14  7:11 [Bug c++/40139] New: [4.4/4.5 Regression] ICE on inavlid use of destructor reichelt at gcc dot gnu dot org
                   ` (3 preceding siblings ...)
  2009-05-15 10:06 ` jakub at gcc dot gnu dot org
@ 2009-05-16 22:38 ` jason at gcc dot gnu dot org
  2009-05-17 18:02 ` jason at gcc dot gnu dot org
                   ` (2 subsequent siblings)
  7 siblings, 0 replies; 9+ messages in thread
From: jason at gcc dot gnu dot org @ 2009-05-16 22:38 UTC (permalink / raw)
  To: gcc-bugs



-- 

jason at gcc dot gnu dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
         AssignedTo|unassigned at gcc dot gnu   |jason at gcc dot gnu dot org
                   |dot org                     |
             Status|NEW                         |ASSIGNED
   Last reconfirmed|2009-05-14 16:45:48         |2009-05-16 22:38:35
               date|                            |


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


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

* [Bug c++/40139] [4.4/4.5 Regression] ICE on invalid use of destructor
  2009-05-14  7:11 [Bug c++/40139] New: [4.4/4.5 Regression] ICE on inavlid use of destructor reichelt at gcc dot gnu dot org
                   ` (4 preceding siblings ...)
  2009-05-16 22:38 ` jason at gcc dot gnu dot org
@ 2009-05-17 18:02 ` jason at gcc dot gnu dot org
  2009-05-17 20:35 ` jason at gcc dot gnu dot org
  2009-05-20 21:16 ` jakub at gcc dot gnu dot org
  7 siblings, 0 replies; 9+ messages in thread
From: jason at gcc dot gnu dot org @ 2009-05-17 18:02 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #3 from jason at gcc dot gnu dot org  2009-05-17 18:01 -------
Subject: Bug 40139

Author: jason
Date: Sun May 17 18:01:33 2009
New Revision: 147638

URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=147638
Log:
        PR c++/40139
        * pt.c (tsubst_qualified_id): Retain the type if we aren't dealing
        with a dependent type.  Actually look up the destructor.
        * semantics.c (finish_id_expression): Fix logic.
        (finish_qualified_id_expr): Don't try to use 'this' if we aren't in
        a function.
        * typeck.c (build_x_unary_op): Diagnose taking the address of a
        constructor or destructor.
        * tree.c (get_first_fn): Handle OFFSET_REF.

Added:
    trunk/gcc/testsuite/g++.dg/template/dtor6.C
Modified:
    trunk/gcc/cp/ChangeLog
    trunk/gcc/cp/pt.c
    trunk/gcc/cp/semantics.c
    trunk/gcc/cp/tree.c
    trunk/gcc/cp/typeck.c
    trunk/gcc/testsuite/ChangeLog


-- 


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


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

* [Bug c++/40139] [4.4/4.5 Regression] ICE on invalid use of destructor
  2009-05-14  7:11 [Bug c++/40139] New: [4.4/4.5 Regression] ICE on inavlid use of destructor reichelt at gcc dot gnu dot org
                   ` (5 preceding siblings ...)
  2009-05-17 18:02 ` jason at gcc dot gnu dot org
@ 2009-05-17 20:35 ` jason at gcc dot gnu dot org
  2009-05-20 21:16 ` jakub at gcc dot gnu dot org
  7 siblings, 0 replies; 9+ messages in thread
From: jason at gcc dot gnu dot org @ 2009-05-17 20:35 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #4 from jason at gcc dot gnu dot org  2009-05-17 20:34 -------
Subject: Bug 40139

Author: jason
Date: Sun May 17 20:34:30 2009
New Revision: 147643

URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=147643
Log:
        PR c++/40139
        * semantics.c (finish_id_expression): Fix logic.

Added:
    branches/gcc-4_4-branch/gcc/testsuite/g++.dg/template/dtor6.C
      - copied, changed from r147638,
trunk/gcc/testsuite/g++.dg/template/dtor6.C
Modified:
    branches/gcc-4_4-branch/gcc/cp/ChangeLog
    branches/gcc-4_4-branch/gcc/cp/semantics.c
    branches/gcc-4_4-branch/gcc/testsuite/ChangeLog


-- 


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


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

* [Bug c++/40139] [4.4/4.5 Regression] ICE on invalid use of destructor
  2009-05-14  7:11 [Bug c++/40139] New: [4.4/4.5 Regression] ICE on inavlid use of destructor reichelt at gcc dot gnu dot org
                   ` (6 preceding siblings ...)
  2009-05-17 20:35 ` jason at gcc dot gnu dot org
@ 2009-05-20 21:16 ` jakub at gcc dot gnu dot org
  7 siblings, 0 replies; 9+ messages in thread
From: jakub at gcc dot gnu dot org @ 2009-05-20 21:16 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #5 from jakub at gcc dot gnu dot org  2009-05-20 21:16 -------
Fixed, thanks.


-- 

jakub at gcc dot gnu dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|ASSIGNED                    |RESOLVED
         Resolution|                            |FIXED


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


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

end of thread, other threads:[~2009-05-20 21:16 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2009-05-14  7:11 [Bug c++/40139] New: [4.4/4.5 Regression] ICE on inavlid use of destructor reichelt at gcc dot gnu dot org
2009-05-14  7:11 ` [Bug c++/40139] " reichelt at gcc dot gnu dot org
2009-05-14  9:19 ` [Bug c++/40139] [4.4/4.5 Regression] ICE on invalid " rguenth at gcc dot gnu dot org
2009-05-14 16:46 ` jakub at gcc dot gnu dot org
2009-05-15 10:06 ` jakub at gcc dot gnu dot org
2009-05-16 22:38 ` jason at gcc dot gnu dot org
2009-05-17 18:02 ` jason at gcc dot gnu dot org
2009-05-17 20:35 ` jason at gcc dot gnu dot org
2009-05-20 21:16 ` jakub 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).