public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c++/51402] New: [4.6/4.7 Regression] ICE with invalid template parameter
@ 2011-12-04  0:34 reichelt at gcc dot gnu.org
  2011-12-04  0:35 ` [Bug c++/51402] " reichelt at gcc dot gnu.org
                   ` (5 more replies)
  0 siblings, 6 replies; 7+ messages in thread
From: reichelt at gcc dot gnu.org @ 2011-12-04  0:34 UTC (permalink / raw)
  To: gcc-bugs

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

             Bug #: 51402
           Summary: [4.6/4.7 Regression] ICE with invalid template
                    parameter
    Classification: Unclassified
           Product: gcc
           Version: 4.7.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: c++
        AssignedTo: unassigned@gcc.gnu.org
        ReportedBy: reichelt@gcc.gnu.org


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

=====================================
template<void> struct A
{
  template<int,int> struct B {};
  template<int N> struct B<N,N> {};
};
=====================================

bug.cc:1:10: error: 'void' is not a valid type for a template non-type
parameter
bug.cc:4:33: internal compiler error: tree check: expected class 'type', have
'exceptional' (error_mark) in template_class_depth, at cp/pt.c:365
Please submit a full bug report, [etc.]


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

* [Bug c++/51402] [4.6/4.7 Regression] ICE with invalid template parameter
  2011-12-04  0:34 [Bug c++/51402] New: [4.6/4.7 Regression] ICE with invalid template parameter reichelt at gcc dot gnu.org
@ 2011-12-04  0:35 ` reichelt at gcc dot gnu.org
  2011-12-06 14:31 ` rguenth at gcc dot gnu.org
                   ` (4 subsequent siblings)
  5 siblings, 0 replies; 7+ messages in thread
From: reichelt at gcc dot gnu.org @ 2011-12-04  0:35 UTC (permalink / raw)
  To: gcc-bugs

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

Volker Reichelt <reichelt at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
           Keywords|                            |error-recovery,
                   |                            |ice-checking,
                   |                            |ice-on-invalid-code
   Target Milestone|---                         |4.6.3


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

* [Bug c++/51402] [4.6/4.7 Regression] ICE with invalid template parameter
  2011-12-04  0:34 [Bug c++/51402] New: [4.6/4.7 Regression] ICE with invalid template parameter reichelt at gcc dot gnu.org
  2011-12-04  0:35 ` [Bug c++/51402] " reichelt at gcc dot gnu.org
@ 2011-12-06 14:31 ` rguenth at gcc dot gnu.org
  2012-01-07 22:34 ` pinskia at gcc dot gnu.org
                   ` (3 subsequent siblings)
  5 siblings, 0 replies; 7+ messages in thread
From: rguenth at gcc dot gnu.org @ 2011-12-06 14:31 UTC (permalink / raw)
  To: gcc-bugs

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

Richard Guenther <rguenth at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
           Priority|P3                          |P5


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

* [Bug c++/51402] [4.6/4.7 Regression] ICE with invalid template parameter
  2011-12-04  0:34 [Bug c++/51402] New: [4.6/4.7 Regression] ICE with invalid template parameter reichelt at gcc dot gnu.org
  2011-12-04  0:35 ` [Bug c++/51402] " reichelt at gcc dot gnu.org
  2011-12-06 14:31 ` rguenth at gcc dot gnu.org
@ 2012-01-07 22:34 ` pinskia at gcc dot gnu.org
  2012-01-20 12:34 ` paolo.carlini at oracle dot com
                   ` (2 subsequent siblings)
  5 siblings, 0 replies; 7+ messages in thread
From: pinskia at gcc dot gnu.org @ 2012-01-07 22:34 UTC (permalink / raw)
  To: gcc-bugs

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

Andrew Pinski <pinskia at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |NEW
   Last reconfirmed|                            |2012-01-07
     Ever Confirmed|0                           |1

--- Comment #1 from Andrew Pinski <pinskia at gcc dot gnu.org> 2012-01-07 22:34:32 UTC ---
Confirmed.


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

* [Bug c++/51402] [4.6/4.7 Regression] ICE with invalid template parameter
  2011-12-04  0:34 [Bug c++/51402] New: [4.6/4.7 Regression] ICE with invalid template parameter reichelt at gcc dot gnu.org
                   ` (2 preceding siblings ...)
  2012-01-07 22:34 ` pinskia at gcc dot gnu.org
@ 2012-01-20 12:34 ` paolo.carlini at oracle dot com
  2012-01-20 17:38 ` paolo at gcc dot gnu.org
  2012-01-20 17:39 ` paolo.carlini at oracle dot com
  5 siblings, 0 replies; 7+ messages in thread
From: paolo.carlini at oracle dot com @ 2012-01-20 12:34 UTC (permalink / raw)
  To: gcc-bugs

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

Paolo Carlini <paolo.carlini at oracle dot com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |ASSIGNED
         AssignedTo|unassigned at gcc dot       |paolo.carlini at oracle dot
                   |gnu.org                     |com

--- Comment #2 from Paolo Carlini <paolo.carlini at oracle dot com> 2012-01-20 11:50:56 UTC ---
On it.


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

* [Bug c++/51402] [4.6/4.7 Regression] ICE with invalid template parameter
  2011-12-04  0:34 [Bug c++/51402] New: [4.6/4.7 Regression] ICE with invalid template parameter reichelt at gcc dot gnu.org
                   ` (3 preceding siblings ...)
  2012-01-20 12:34 ` paolo.carlini at oracle dot com
@ 2012-01-20 17:38 ` paolo at gcc dot gnu.org
  2012-01-20 17:39 ` paolo.carlini at oracle dot com
  5 siblings, 0 replies; 7+ messages in thread
From: paolo at gcc dot gnu.org @ 2012-01-20 17:38 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #3 from paolo at gcc dot gnu.org <paolo at gcc dot gnu.org> 2012-01-20 17:21:27 UTC ---
Author: paolo
Date: Fri Jan 20 17:21:19 2012
New Revision: 183345

URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=183345
Log:
/cp
2012-01-20  Paolo Carlini  <paolo.carlini@oracle.com>

    PR c++/51402
    * pt.c (lookup_template_class_1): Check context returned by
    tsubst for error_mark_node.

/testsuite
2012-01-20  Paolo Carlini  <paolo.carlini@oracle.com>

    PR c++/51402
    * g++.dg/template/crash110.C: New.

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


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

* [Bug c++/51402] [4.6/4.7 Regression] ICE with invalid template parameter
  2011-12-04  0:34 [Bug c++/51402] New: [4.6/4.7 Regression] ICE with invalid template parameter reichelt at gcc dot gnu.org
                   ` (4 preceding siblings ...)
  2012-01-20 17:38 ` paolo at gcc dot gnu.org
@ 2012-01-20 17:39 ` paolo.carlini at oracle dot com
  5 siblings, 0 replies; 7+ messages in thread
From: paolo.carlini at oracle dot com @ 2012-01-20 17:39 UTC (permalink / raw)
  To: gcc-bugs

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

Paolo Carlini <paolo.carlini at oracle dot com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|ASSIGNED                    |RESOLVED
         Resolution|                            |FIXED
   Target Milestone|4.6.3                       |4.7.0

--- Comment #4 from Paolo Carlini <paolo.carlini at oracle dot com> 2012-01-20 17:23:04 UTC ---
Fixed for 4.7.0.


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

end of thread, other threads:[~2012-01-20 17:23 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-12-04  0:34 [Bug c++/51402] New: [4.6/4.7 Regression] ICE with invalid template parameter reichelt at gcc dot gnu.org
2011-12-04  0:35 ` [Bug c++/51402] " reichelt at gcc dot gnu.org
2011-12-06 14:31 ` rguenth at gcc dot gnu.org
2012-01-07 22:34 ` pinskia at gcc dot gnu.org
2012-01-20 12:34 ` paolo.carlini at oracle dot com
2012-01-20 17:38 ` paolo at gcc dot gnu.org
2012-01-20 17:39 ` paolo.carlini at oracle dot com

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