public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c++/51403] [4.7 Regression] ICE with invalid template parameter
  2011-12-04  0:53 [Bug c++/51403] New: [4.7 Regression] ICE with invalid template parameter reichelt at gcc dot gnu.org
@ 2011-12-04  0:53 ` reichelt at gcc dot gnu.org
  2011-12-06 14:28 ` rguenth at gcc dot gnu.org
                   ` (3 subsequent siblings)
  4 siblings, 0 replies; 6+ messages in thread
From: reichelt at gcc dot gnu.org @ 2011-12-04  0:53 UTC (permalink / raw)
  To: gcc-bugs

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

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

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


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

* [Bug c++/51403] New: [4.7 Regression] ICE with invalid template parameter
@ 2011-12-04  0:53 reichelt at gcc dot gnu.org
  2011-12-04  0:53 ` [Bug c++/51403] " reichelt at gcc dot gnu.org
                   ` (4 more replies)
  0 siblings, 5 replies; 6+ messages in thread
From: reichelt at gcc dot gnu.org @ 2011-12-04  0:53 UTC (permalink / raw)
  To: gcc-bugs

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

             Bug #: 51403
           Summary: [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 on trunk:

================================================================
template<typename T, void, typename U> void foo(T, U, int) {}

void bar()
{
  foo(0, 0, 0);
}
================================================================

bug.cc:1:22: error: 'void' is not a valid type for a template non-type
parameter
bug.cc: In function 'void bar()':
bug.cc:5:14: internal compiler error: in unify, at cp/pt.c:16222
Please submit a full bug report, [etc.]


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

* [Bug c++/51403] [4.7 Regression] ICE with invalid template parameter
  2011-12-04  0:53 [Bug c++/51403] New: [4.7 Regression] ICE with invalid template parameter reichelt at gcc dot gnu.org
  2011-12-04  0:53 ` [Bug c++/51403] " reichelt at gcc dot gnu.org
@ 2011-12-06 14:28 ` rguenth at gcc dot gnu.org
  2011-12-07 17:06 ` paolo.carlini at oracle dot com
                   ` (2 subsequent siblings)
  4 siblings, 0 replies; 6+ messages in thread
From: rguenth at gcc dot gnu.org @ 2011-12-06 14:28 UTC (permalink / raw)
  To: gcc-bugs

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

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

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


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

* [Bug c++/51403] [4.7 Regression] ICE with invalid template parameter
  2011-12-04  0:53 [Bug c++/51403] New: [4.7 Regression] ICE with invalid template parameter reichelt at gcc dot gnu.org
  2011-12-04  0:53 ` [Bug c++/51403] " reichelt at gcc dot gnu.org
  2011-12-06 14:28 ` rguenth at gcc dot gnu.org
@ 2011-12-07 17:06 ` paolo.carlini at oracle dot com
  2012-01-12 17:27 ` jason at gcc dot gnu.org
  2012-01-12 17:51 ` jason at gcc dot gnu.org
  4 siblings, 0 replies; 6+ messages in thread
From: paolo.carlini at oracle dot com @ 2011-12-07 17:06 UTC (permalink / raw)
  To: gcc-bugs

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

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

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |NEW
   Last reconfirmed|                            |2011-12-07
     Ever Confirmed|0                           |1

--- Comment #1 from Paolo Carlini <paolo.carlini at oracle dot com> 2011-12-07 17:06:11 UTC ---
Doesn't ICE in release mode.

In general, we have an issue with <void> as non-type parameter: when we see it,
we of course error out, we store an error_mark_node and go ahead normally. Then
the error_mark_node can come out in many different places: lots of ICEs, all
ultimately due to the same issue.


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

* [Bug c++/51403] [4.7 Regression] ICE with invalid template parameter
  2011-12-04  0:53 [Bug c++/51403] New: [4.7 Regression] ICE with invalid template parameter reichelt at gcc dot gnu.org
                   ` (2 preceding siblings ...)
  2011-12-07 17:06 ` paolo.carlini at oracle dot com
@ 2012-01-12 17:27 ` jason at gcc dot gnu.org
  2012-01-12 17:51 ` jason at gcc dot gnu.org
  4 siblings, 0 replies; 6+ messages in thread
From: jason at gcc dot gnu.org @ 2012-01-12 17:27 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #2 from Jason Merrill <jason at gcc dot gnu.org> 2012-01-12 17:27:02 UTC ---
Author: jason
Date: Thu Jan 12 17:26:57 2012
New Revision: 183132

URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=183132
Log:
    PR c++/51403
    * pt.c (unify): Handle error_mark_node.

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


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

* [Bug c++/51403] [4.7 Regression] ICE with invalid template parameter
  2011-12-04  0:53 [Bug c++/51403] New: [4.7 Regression] ICE with invalid template parameter reichelt at gcc dot gnu.org
                   ` (3 preceding siblings ...)
  2012-01-12 17:27 ` jason at gcc dot gnu.org
@ 2012-01-12 17:51 ` jason at gcc dot gnu.org
  4 siblings, 0 replies; 6+ messages in thread
From: jason at gcc dot gnu.org @ 2012-01-12 17:51 UTC (permalink / raw)
  To: gcc-bugs

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

Jason Merrill <jason at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |RESOLVED
                 CC|                            |jason at gcc dot gnu.org
         Resolution|                            |FIXED

--- Comment #3 from Jason Merrill <jason at gcc dot gnu.org> 2012-01-12 17:50:40 UTC ---
Fixed.


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

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

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-12-04  0:53 [Bug c++/51403] New: [4.7 Regression] ICE with invalid template parameter reichelt at gcc dot gnu.org
2011-12-04  0:53 ` [Bug c++/51403] " reichelt at gcc dot gnu.org
2011-12-06 14:28 ` rguenth at gcc dot gnu.org
2011-12-07 17:06 ` paolo.carlini at oracle dot com
2012-01-12 17:27 ` jason at gcc dot gnu.org
2012-01-12 17:51 ` jason at gcc dot gnu.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).