public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c++/54653] New: [4.6/4.7/4.8 Regression] tsubst_template_parms ICE
@ 2012-09-21 10:15 jakub at gcc dot gnu.org
  2012-10-01 16:26 ` [Bug c++/54653] " paolo.carlini at oracle dot com
                   ` (7 more replies)
  0 siblings, 8 replies; 9+ messages in thread
From: jakub at gcc dot gnu.org @ 2012-09-21 10:15 UTC (permalink / raw)
  To: gcc-bugs


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

             Bug #: 54653
           Summary: [4.6/4.7/4.8 Regression] tsubst_template_parms ICE
    Classification: Unclassified
           Product: gcc
           Version: 4.7.1
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: c++
        AssignedTo: unassigned@gcc.gnu.org
        ReportedBy: jakub@gcc.gnu.org


union A {};

struct B
{
  template <class T> struct C {};
};

template <class F, template <class T> class D = B::template C>
struct E;

template <typename R, template <class T> class D>
struct E <R (), D>
{
  void (*f) (A &);
  template <class I, template <class T> class J>
  struct G { static void d (A &); };
  template <class H> inline E (H &fn)
  {
    f = &(G <H, D>::d);
  }
};

template <typename R, template <class T> class D>
struct E <R (), D>::G <R (*) (), D>
{
};

struct Z { int z; };

int
main ()
{
  Z t = {};
  E <int ()> f (t);
}

ICEs in tsubst_template_parms, because parms is NULL.  The ICE started in
between r128000 and r128500.


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

* [Bug c++/54653] [4.6/4.7/4.8 Regression] tsubst_template_parms ICE
  2012-09-21 10:15 [Bug c++/54653] New: [4.6/4.7/4.8 Regression] tsubst_template_parms ICE jakub at gcc dot gnu.org
@ 2012-10-01 16:26 ` paolo.carlini at oracle dot com
  2012-10-01 18:37 ` hjl.tools at gmail dot com
                   ` (6 subsequent siblings)
  7 siblings, 0 replies; 9+ messages in thread
From: paolo.carlini at oracle dot com @ 2012-10-01 16:26 UTC (permalink / raw)
  To: gcc-bugs


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

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

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |hjl.tools at gmail dot com

--- Comment #1 from Paolo Carlini <paolo.carlini at oracle dot com> 2012-10-01 16:26:22 UTC ---
H.J. can you help finding the offending commit?


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

* [Bug c++/54653] [4.6/4.7/4.8 Regression] tsubst_template_parms ICE
  2012-09-21 10:15 [Bug c++/54653] New: [4.6/4.7/4.8 Regression] tsubst_template_parms ICE jakub at gcc dot gnu.org
  2012-10-01 16:26 ` [Bug c++/54653] " paolo.carlini at oracle dot com
@ 2012-10-01 18:37 ` hjl.tools at gmail dot com
  2012-10-01 22:10 ` paolo.carlini at oracle dot com
                   ` (5 subsequent siblings)
  7 siblings, 0 replies; 9+ messages in thread
From: hjl.tools at gmail dot com @ 2012-10-01 18:37 UTC (permalink / raw)
  To: gcc-bugs


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

H.J. Lu <hjl.tools at gmail dot com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |NEW
   Last reconfirmed|                            |2012-10-01
   Target Milestone|---                         |4.6.4
     Ever Confirmed|0                           |1

--- Comment #2 from H.J. Lu <hjl.tools at gmail dot com> 2012-10-01 18:37:26 UTC ---
It is caused by revision 128076:

http://gcc.gnu.org/ml/gcc-cvs/2007-09/msg00070.html


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

* [Bug c++/54653] [4.6/4.7/4.8 Regression] tsubst_template_parms ICE
  2012-09-21 10:15 [Bug c++/54653] New: [4.6/4.7/4.8 Regression] tsubst_template_parms ICE jakub at gcc dot gnu.org
  2012-10-01 16:26 ` [Bug c++/54653] " paolo.carlini at oracle dot com
  2012-10-01 18:37 ` hjl.tools at gmail dot com
@ 2012-10-01 22:10 ` paolo.carlini at oracle dot com
  2012-12-03 15:44 ` rguenth at gcc dot gnu.org
                   ` (4 subsequent siblings)
  7 siblings, 0 replies; 9+ messages in thread
From: paolo.carlini at oracle dot com @ 2012-10-01 22:10 UTC (permalink / raw)
  To: gcc-bugs


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

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

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

--- Comment #3 from Paolo Carlini <paolo.carlini at oracle dot com> 2012-10-01 22:09:53 UTC ---
Thanks H.J. let's add Jason in CC.


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

* [Bug c++/54653] [4.6/4.7/4.8 Regression] tsubst_template_parms ICE
  2012-09-21 10:15 [Bug c++/54653] New: [4.6/4.7/4.8 Regression] tsubst_template_parms ICE jakub at gcc dot gnu.org
                   ` (2 preceding siblings ...)
  2012-10-01 22:10 ` paolo.carlini at oracle dot com
@ 2012-12-03 15:44 ` rguenth at gcc dot gnu.org
  2012-12-05 17:46 ` jason at gcc dot gnu.org
                   ` (3 subsequent siblings)
  7 siblings, 0 replies; 9+ messages in thread
From: rguenth at gcc dot gnu.org @ 2012-12-03 15:44 UTC (permalink / raw)
  To: gcc-bugs


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

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

           What    |Removed                     |Added
----------------------------------------------------------------------------
           Keywords|                            |ice-on-valid-code
           Priority|P3                          |P2


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

* [Bug c++/54653] [4.6/4.7/4.8 Regression] tsubst_template_parms ICE
  2012-09-21 10:15 [Bug c++/54653] New: [4.6/4.7/4.8 Regression] tsubst_template_parms ICE jakub at gcc dot gnu.org
                   ` (3 preceding siblings ...)
  2012-12-03 15:44 ` rguenth at gcc dot gnu.org
@ 2012-12-05 17:46 ` jason at gcc dot gnu.org
  2012-12-05 17:49 ` jakub at gcc dot gnu.org
                   ` (2 subsequent siblings)
  7 siblings, 0 replies; 9+ messages in thread
From: jason at gcc dot gnu.org @ 2012-12-05 17:46 UTC (permalink / raw)
  To: gcc-bugs


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

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

           What    |Removed                     |Added
----------------------------------------------------------------------------
           Keywords|ice-on-valid-code           |ice-on-invalid-code
           Priority|P2                          |P3
             Status|NEW                         |ASSIGNED
         AssignedTo|unassigned at gcc dot       |jason at gcc dot gnu.org
                   |gnu.org                     |

--- Comment #4 from Jason Merrill <jason at gcc dot gnu.org> 2012-12-05 17:46:21 UTC ---
This code is actually ill-formed; the specialization

template <typename R, template <class T> class D>
struct E <R (), D>::G <R (*) (), D>
{
};

only has one template-header, and should have two.  Furthermore, this is a full
specialization of a member of a partial specialization, which is not allowed.

14.8/16: "the declaration shall not explicitly specialize a class member
template if its enclosing class templates are not explicitly specialized as
well."


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

* [Bug c++/54653] [4.6/4.7/4.8 Regression] tsubst_template_parms ICE
  2012-09-21 10:15 [Bug c++/54653] New: [4.6/4.7/4.8 Regression] tsubst_template_parms ICE jakub at gcc dot gnu.org
                   ` (4 preceding siblings ...)
  2012-12-05 17:46 ` jason at gcc dot gnu.org
@ 2012-12-05 17:49 ` jakub at gcc dot gnu.org
  2012-12-06 14:37 ` jason at gcc dot gnu.org
  2012-12-06 14:41 ` jason at gcc dot gnu.org
  7 siblings, 0 replies; 9+ messages in thread
From: jakub at gcc dot gnu.org @ 2012-12-05 17:49 UTC (permalink / raw)
  To: gcc-bugs


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

--- Comment #5 from Jakub Jelinek <jakub at gcc dot gnu.org> 2012-12-05 17:49:20 UTC ---
Perhaps errors introduced during my testcase reduction.  The original bugreport
is
https://bugzilla.redhat.com/show_bug.cgi?id=858351


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

* [Bug c++/54653] [4.6/4.7/4.8 Regression] tsubst_template_parms ICE
  2012-09-21 10:15 [Bug c++/54653] New: [4.6/4.7/4.8 Regression] tsubst_template_parms ICE jakub at gcc dot gnu.org
                   ` (5 preceding siblings ...)
  2012-12-05 17:49 ` jakub at gcc dot gnu.org
@ 2012-12-06 14:37 ` jason at gcc dot gnu.org
  2012-12-06 14:41 ` jason at gcc dot gnu.org
  7 siblings, 0 replies; 9+ messages in thread
From: jason at gcc dot gnu.org @ 2012-12-06 14:37 UTC (permalink / raw)
  To: gcc-bugs


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

--- Comment #6 from Jason Merrill <jason at gcc dot gnu.org> 2012-12-06 14:37:08 UTC ---
Author: jason
Date: Thu Dec  6 14:37:04 2012
New Revision: 194249

URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=194249
Log:
    PR c++/54653
    * parser.c (cp_parser_class_head): A partial specialization scope
    counts as a template.
    * pt.c (tsubst_template_parms): Handle template template parm parms.
    (tsubst_decl) [TEMPLATE_DECL]: Handle getting a template template
    argument back.

Added:
    trunk/gcc/testsuite/g++.dg/template/partial-specialization2.C
Modified:
    trunk/gcc/cp/ChangeLog
    trunk/gcc/cp/parser.c
    trunk/gcc/cp/pt.c


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

* [Bug c++/54653] [4.6/4.7/4.8 Regression] tsubst_template_parms ICE
  2012-09-21 10:15 [Bug c++/54653] New: [4.6/4.7/4.8 Regression] tsubst_template_parms ICE jakub at gcc dot gnu.org
                   ` (6 preceding siblings ...)
  2012-12-06 14:37 ` jason at gcc dot gnu.org
@ 2012-12-06 14:41 ` jason at gcc dot gnu.org
  7 siblings, 0 replies; 9+ messages in thread
From: jason at gcc dot gnu.org @ 2012-12-06 14:41 UTC (permalink / raw)
  To: gcc-bugs


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

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

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|ASSIGNED                    |RESOLVED
         Resolution|                            |FIXED
   Target Milestone|4.6.4                       |4.8.0

--- Comment #7 from Jason Merrill <jason at gcc dot gnu.org> 2012-12-06 14:41:42 UTC ---
Fixed for 4.8, not backporting fixes for invalid code bugs.


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

end of thread, other threads:[~2012-12-06 14:41 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-09-21 10:15 [Bug c++/54653] New: [4.6/4.7/4.8 Regression] tsubst_template_parms ICE jakub at gcc dot gnu.org
2012-10-01 16:26 ` [Bug c++/54653] " paolo.carlini at oracle dot com
2012-10-01 18:37 ` hjl.tools at gmail dot com
2012-10-01 22:10 ` paolo.carlini at oracle dot com
2012-12-03 15:44 ` rguenth at gcc dot gnu.org
2012-12-05 17:46 ` jason at gcc dot gnu.org
2012-12-05 17:49 ` jakub at gcc dot gnu.org
2012-12-06 14:37 ` jason at gcc dot gnu.org
2012-12-06 14:41 ` 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).