public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c++/43953]  New: ICE: dependent_type_p, at cp/pt.c:17404
@ 2010-05-01  6:51 deligonul at gmail dot com
  2010-05-01  6:53 ` [Bug c++/43953] " deligonul at gmail dot com
                   ` (8 more replies)
  0 siblings, 9 replies; 10+ messages in thread
From: deligonul at gmail dot com @ 2010-05-01  6:51 UTC (permalink / raw)
  To: gcc-bugs

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1: Type: text/plain, Size: 1466 bytes --]

The code below causes an ICE in GCC 4.5.0.  It compiles fine in GCC 4.4.3.

$ g++ -save-temps -o crash crash.cpp
crash.cpp: In function ‘int main()’:
crash.cpp:23:22: internal compiler error: in dependent_type_p, at cp/pt.c:17404
Please submit a full bug report, ...


Output of g++ -v:

Using built-in specs.
COLLECT_GCC=g++
COLLECT_LTO_WRAPPER=/home/test/libexec/gcc/x86_64-unknown-linux-gnu/4.5.0/lto-wrapper
Target: x86_64-unknown-linux-gnu
Configured with: ./configure --prefix=/home/test --without-arch32
--without-cpu32 --with-arch64 --with-cpu64 --disable-multilib
Thread model: posix
gcc version 4.5.0 (GCC) 


Test Case:


template <typename T, 
                typename U,
                typename T::type V> 
class bad;

// partial specialization
// for T = U
template<typename T, 
                typename T::type V>
class bad<T, T, V>
{
public:
        static void foo() {}
};

struct dummy 
{
        typedef int type;
};

int main()
{
        bad<dummy, dummy, 0>::foo();
}


-- 
           Summary: ICE: dependent_type_p, at cp/pt.c:17404
           Product: gcc
           Version: 4.5.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: c++
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: deligonul at gmail dot com
  GCC host triplet: x86_64-unknown-linux-gnu
GCC target triplet: x86_64-unknown-linux-gnu


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


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

* [Bug c++/43953] ICE: dependent_type_p, at cp/pt.c:17404
  2010-05-01  6:51 [Bug c++/43953] New: ICE: dependent_type_p, at cp/pt.c:17404 deligonul at gmail dot com
@ 2010-05-01  6:53 ` deligonul at gmail dot com
  2010-05-01  7:09 ` deligonul at gmail dot com
                   ` (7 subsequent siblings)
  8 siblings, 0 replies; 10+ messages in thread
From: deligonul at gmail dot com @ 2010-05-01  6:53 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #1 from deligonul at gmail dot com  2010-05-01 06:52 -------
Created an attachment (id=20524)
 --> (http://gcc.gnu.org/bugzilla/attachment.cgi?id=20524&action=view)
Temp output from gcc


-- 


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


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

* [Bug c++/43953] ICE: dependent_type_p, at cp/pt.c:17404
  2010-05-01  6:51 [Bug c++/43953] New: ICE: dependent_type_p, at cp/pt.c:17404 deligonul at gmail dot com
  2010-05-01  6:53 ` [Bug c++/43953] " deligonul at gmail dot com
@ 2010-05-01  7:09 ` deligonul at gmail dot com
  2010-05-01 13:58 ` hjl dot tools at gmail dot com
                   ` (6 subsequent siblings)
  8 siblings, 0 replies; 10+ messages in thread
From: deligonul at gmail dot com @ 2010-05-01  7:09 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #2 from deligonul at gmail dot com  2010-05-01 07:09 -------
The specialization seems to be causing the problem.  If I remove that (and
define a foo() for the original template), it compiles fine. 


-- 

deligonul at gmail dot com changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |deligonul at gmail dot com


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


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

* [Bug c++/43953] ICE: dependent_type_p, at cp/pt.c:17404
  2010-05-01  6:51 [Bug c++/43953] New: ICE: dependent_type_p, at cp/pt.c:17404 deligonul at gmail dot com
  2010-05-01  6:53 ` [Bug c++/43953] " deligonul at gmail dot com
  2010-05-01  7:09 ` deligonul at gmail dot com
@ 2010-05-01 13:58 ` hjl dot tools at gmail dot com
  2010-05-03 17:54 ` dodji at gcc dot gnu dot org
                   ` (5 subsequent siblings)
  8 siblings, 0 replies; 10+ messages in thread
From: hjl dot tools at gmail dot com @ 2010-05-01 13:58 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #3 from hjl dot tools at gmail dot com  2010-05-01 13:58 -------
It is caused by revision 157745:

http://gcc.gnu.org/ml/gcc-cvs/2010-03/msg00582.html


-- 

hjl dot tools at gmail dot com changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |dseketel at redhat dot com
             Status|UNCONFIRMED                 |NEW
     Ever Confirmed|0                           |1
   Last reconfirmed|0000-00-00 00:00:00         |2010-05-01 13:58:34
               date|                            |


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


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

* [Bug c++/43953] ICE: dependent_type_p, at cp/pt.c:17404
  2010-05-01  6:51 [Bug c++/43953] New: ICE: dependent_type_p, at cp/pt.c:17404 deligonul at gmail dot com
                   ` (2 preceding siblings ...)
  2010-05-01 13:58 ` hjl dot tools at gmail dot com
@ 2010-05-03 17:54 ` dodji at gcc dot gnu dot org
  2010-05-03 18:10 ` [Bug c++/43953] [4.5/4.6 regression] " hjl dot tools at gmail dot com
                   ` (4 subsequent siblings)
  8 siblings, 0 replies; 10+ messages in thread
From: dodji at gcc dot gnu dot org @ 2010-05-03 17:54 UTC (permalink / raw)
  To: gcc-bugs



-- 

dodji at gcc dot gnu dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
         AssignedTo|unassigned at gcc dot gnu   |dodji at gcc dot gnu dot org
                   |dot org                     |
             Status|NEW                         |ASSIGNED
   Last reconfirmed|2010-05-01 13:58:34         |2010-05-03 17:54:28
               date|                            |


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


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

* [Bug c++/43953] [4.5/4.6 regression] ICE: dependent_type_p, at cp/pt.c:17404
  2010-05-01  6:51 [Bug c++/43953] New: ICE: dependent_type_p, at cp/pt.c:17404 deligonul at gmail dot com
                   ` (3 preceding siblings ...)
  2010-05-03 17:54 ` dodji at gcc dot gnu dot org
@ 2010-05-03 18:10 ` hjl dot tools at gmail dot com
  2010-05-04  9:50 ` dodji at gcc dot gnu dot org
                   ` (3 subsequent siblings)
  8 siblings, 0 replies; 10+ messages in thread
From: hjl dot tools at gmail dot com @ 2010-05-03 18:10 UTC (permalink / raw)
  To: gcc-bugs



-- 

hjl dot tools at gmail dot com changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
            Summary|ICE: dependent_type_p, at   |[4.5/4.6 regression] ICE:
                   |cp/pt.c:17404               |dependent_type_p, at
                   |                            |cp/pt.c:17404
   Target Milestone|---                         |4.5.1


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


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

* [Bug c++/43953] [4.5/4.6 regression] ICE: dependent_type_p, at cp/pt.c:17404
  2010-05-01  6:51 [Bug c++/43953] New: ICE: dependent_type_p, at cp/pt.c:17404 deligonul at gmail dot com
                   ` (4 preceding siblings ...)
  2010-05-03 18:10 ` [Bug c++/43953] [4.5/4.6 regression] " hjl dot tools at gmail dot com
@ 2010-05-04  9:50 ` dodji at gcc dot gnu dot org
  2010-05-04  9:58 ` dodji at gcc dot gnu dot org
                   ` (2 subsequent siblings)
  8 siblings, 0 replies; 10+ messages in thread
From: dodji at gcc dot gnu dot org @ 2010-05-04  9:50 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #4 from dodji at gcc dot gnu dot org  2010-05-04 09:50 -------
Subject: Bug 43953

Author: dodji
Date: Tue May  4 09:49:45 2010
New Revision: 159019

URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=159019
Log:
Fix PR c++/43953

gcc/cp/ChangeLog:
        PR c++/43953
        * pt.c (most_specialized_class): Pretend we are processing
        a template decl during the call to coerce_template_parms.

gcc/testsuite/ChangeLog:
        PR c++/43953
        * g++.dg/other/crash-12.C: New test.

Added:
    trunk/gcc/testsuite/g++.dg/other/crash-12.C
Modified:
    trunk/gcc/cp/ChangeLog
    trunk/gcc/cp/pt.c
    trunk/gcc/testsuite/ChangeLog


-- 


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


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

* [Bug c++/43953] [4.5/4.6 regression] ICE: dependent_type_p, at cp/pt.c:17404
  2010-05-01  6:51 [Bug c++/43953] New: ICE: dependent_type_p, at cp/pt.c:17404 deligonul at gmail dot com
                   ` (5 preceding siblings ...)
  2010-05-04  9:50 ` dodji at gcc dot gnu dot org
@ 2010-05-04  9:58 ` dodji at gcc dot gnu dot org
  2010-05-04 10:01 ` dodji at gcc dot gnu dot org
  2010-05-04 10:31 ` dodji at gcc dot gnu dot org
  8 siblings, 0 replies; 10+ messages in thread
From: dodji at gcc dot gnu dot org @ 2010-05-04  9:58 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #5 from dodji at gcc dot gnu dot org  2010-05-04 09:58 -------
Subject: Bug 43953

Author: dodji
Date: Tue May  4 09:58:03 2010
New Revision: 159021

URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=159021
Log:
Fix PR c++/43953

gcc/cp/ChangeLog:
        PR c++/43953
        * pt.c (most_specialized_class): Pretend we are processing
        a template decl during the call to coerce_template_parms.

gcc/testsuite/ChangeLog:
        PR c++/43953
        * g++.dg/other/crash-12.C: New test.

Added:
    branches/gcc-4_5-branch/gcc/testsuite/g++.dg/other/crash-12.C
Modified:
    branches/gcc-4_5-branch/gcc/cp/ChangeLog
    branches/gcc-4_5-branch/gcc/cp/pt.c
    branches/gcc-4_5-branch/gcc/testsuite/ChangeLog


-- 


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


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

* [Bug c++/43953] [4.5/4.6 regression] ICE: dependent_type_p, at cp/pt.c:17404
  2010-05-01  6:51 [Bug c++/43953] New: ICE: dependent_type_p, at cp/pt.c:17404 deligonul at gmail dot com
                   ` (6 preceding siblings ...)
  2010-05-04  9:58 ` dodji at gcc dot gnu dot org
@ 2010-05-04 10:01 ` dodji at gcc dot gnu dot org
  2010-05-04 10:31 ` dodji at gcc dot gnu dot org
  8 siblings, 0 replies; 10+ messages in thread
From: dodji at gcc dot gnu dot org @ 2010-05-04 10:01 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #6 from dodji at gcc dot gnu dot org  2010-05-04 10:01 -------
Fixed in 4.6 (trunk) and 4.5.1.


-- 


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


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

* [Bug c++/43953] [4.5/4.6 regression] ICE: dependent_type_p, at cp/pt.c:17404
  2010-05-01  6:51 [Bug c++/43953] New: ICE: dependent_type_p, at cp/pt.c:17404 deligonul at gmail dot com
                   ` (7 preceding siblings ...)
  2010-05-04 10:01 ` dodji at gcc dot gnu dot org
@ 2010-05-04 10:31 ` dodji at gcc dot gnu dot org
  8 siblings, 0 replies; 10+ messages in thread
From: dodji at gcc dot gnu dot org @ 2010-05-04 10:31 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #7 from dodji at gcc dot gnu dot org  2010-05-04 10:31 -------
Close this now.


-- 

dodji at gcc dot gnu dot org changed:

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


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


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

end of thread, other threads:[~2010-05-04 10:31 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2010-05-01  6:51 [Bug c++/43953] New: ICE: dependent_type_p, at cp/pt.c:17404 deligonul at gmail dot com
2010-05-01  6:53 ` [Bug c++/43953] " deligonul at gmail dot com
2010-05-01  7:09 ` deligonul at gmail dot com
2010-05-01 13:58 ` hjl dot tools at gmail dot com
2010-05-03 17:54 ` dodji at gcc dot gnu dot org
2010-05-03 18:10 ` [Bug c++/43953] [4.5/4.6 regression] " hjl dot tools at gmail dot com
2010-05-04  9:50 ` dodji at gcc dot gnu dot org
2010-05-04  9:58 ` dodji at gcc dot gnu dot org
2010-05-04 10:01 ` dodji at gcc dot gnu dot org
2010-05-04 10:31 ` dodji 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).