public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c++/95263] New: ice in lookup_template_class_1
@ 2020-05-21 21:13 dcb314 at hotmail dot com
  2020-05-21 21:36 ` [Bug c++/95263] [11 Regression] ICE in lookup_template_class_1 since r11-504-g74744bb1f2847b5b marxin at gcc dot gnu.org
                   ` (4 more replies)
  0 siblings, 5 replies; 6+ messages in thread
From: dcb314 at hotmail dot com @ 2020-05-21 21:13 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=95263

            Bug ID: 95263
           Summary: ice in lookup_template_class_1
           Product: gcc
           Version: unknown
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: c++
          Assignee: unassigned at gcc dot gnu.org
          Reporter: dcb314 at hotmail dot com
  Target Milestone: ---

For this C++ code

enum a { b };
template <class, a, class = int, class = int> class c;
template <class ac, a ad = b> using d = c<ac, ad>;
template <class> class f { template <class, a> using aj = int; };
template <class g> class h {
public:
  using an = f<g>;
  template <class ai, a ad> using aj = typename an::aj<ai, ad>;
  template <a> void aw();
  template <a ad, class ai> aj<ai, ad> aw();
};
template <class, a ad, class, class> class c : h<c<int, ad>> {
public:
  c();
};
template <class az, a ad, class ba, class bb> c<az, ad, ba, bb>::c() {
  this->template aw<b>();
}
void i() { d<int> e; }

on recent gcc trunk, does this:

bug610.cc: In substitution of ‘template<class g> template<class ai, a ad> using 
aj = typename h<g>::an::aj<ai, ad> [with ai = ai; a ad = b; g = c<int, b, int,
i
nt>]’:
bug610.cc:10:40:   required by substitution of ‘template<a ad, class ai>
h<c<int
, b, int, int> >::aj<ai, ad> h<c<int, b, int, int> >::aw<ad, ai>() [with a ad = 
b; ai = <missing>]’
bug610.cc:17:23:   required from ‘c< <template-parameter-1-1>, <anonymous>,
<tem
plate-parameter-1-3>, <template-parameter-1-4> >::c() [with
<template-parameter-
1-1> = int; a ad = b; <template-parameter-1-3> = int; <template-parameter-1-4>
=
 int]’
bug610.cc:19:19:   required from here
bug610.cc:8:35: internal compiler error: in lookup_template_class_1, at
cp/pt.c:
10076
    8 |   template <class ai, a ad> using aj = typename an::aj<ai, ad>;
      |                                   ^~
0x82a5b3 lookup_template_class_1(tree_node*, tree_node*, tree_node*,
tree_node*,
 int, int)
        ../../trunk.git/gcc/cp/pt.c:10075
0x828739 lookup_template_class(tree_node*, tree_node*, tree_node*, tree_node*,
i
nt, int)
        ../../trunk.git/gcc/cp/pt.c:10128
0x815633 tsubst(tree_node*, tree_node*, int, tree_node*)
        ../../trunk.git/gcc/cp/pt.c:15831

The bug first seems to occur sometime between 20200519 and 20200520.

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

* [Bug c++/95263] [11 Regression] ICE in lookup_template_class_1 since r11-504-g74744bb1f2847b5b
  2020-05-21 21:13 [Bug c++/95263] New: ice in lookup_template_class_1 dcb314 at hotmail dot com
@ 2020-05-21 21:36 ` marxin at gcc dot gnu.org
  2020-05-21 21:42 ` nathan at gcc dot gnu.org
                   ` (3 subsequent siblings)
  4 siblings, 0 replies; 6+ messages in thread
From: marxin at gcc dot gnu.org @ 2020-05-21 21:36 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=95263

Martin Liška <marxin at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
            Summary|ice in                      |[11 Regression] ICE in
                   |lookup_template_class_1     |lookup_template_class_1
                   |                            |since
                   |                            |r11-504-g74744bb1f2847b5b
           Keywords|                            |ice-on-valid-code
     Ever confirmed|0                           |1
                 CC|                            |marxin at gcc dot gnu.org,
                   |                            |nathan at gcc dot gnu.org
            Version|unknown                     |11.0
   Target Milestone|---                         |11.0
   Last reconfirmed|                            |2020-05-21
      Known to fail|                            |11.0
             Status|UNCONFIRMED                 |NEW
      Known to work|                            |10.1.0

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

* [Bug c++/95263] [11 Regression] ICE in lookup_template_class_1 since r11-504-g74744bb1f2847b5b
  2020-05-21 21:13 [Bug c++/95263] New: ice in lookup_template_class_1 dcb314 at hotmail dot com
  2020-05-21 21:36 ` [Bug c++/95263] [11 Regression] ICE in lookup_template_class_1 since r11-504-g74744bb1f2847b5b marxin at gcc dot gnu.org
@ 2020-05-21 21:42 ` nathan at gcc dot gnu.org
  2020-05-26 17:09 ` nathan at gcc dot gnu.org
                   ` (2 subsequent siblings)
  4 siblings, 0 replies; 6+ messages in thread
From: nathan at gcc dot gnu.org @ 2020-05-21 21:42 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=95263

Nathan Sidwell <nathan at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |ASSIGNED
           Assignee|unassigned at gcc dot gnu.org      |nathan at gcc dot gnu.org

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

* [Bug c++/95263] [11 Regression] ICE in lookup_template_class_1 since r11-504-g74744bb1f2847b5b
  2020-05-21 21:13 [Bug c++/95263] New: ice in lookup_template_class_1 dcb314 at hotmail dot com
  2020-05-21 21:36 ` [Bug c++/95263] [11 Regression] ICE in lookup_template_class_1 since r11-504-g74744bb1f2847b5b marxin at gcc dot gnu.org
  2020-05-21 21:42 ` nathan at gcc dot gnu.org
@ 2020-05-26 17:09 ` nathan at gcc dot gnu.org
  2020-05-27 13:59 ` cvs-commit at gcc dot gnu.org
  2020-10-07 14:36 ` nathan at gcc dot gnu.org
  4 siblings, 0 replies; 6+ messages in thread
From: nathan at gcc dot gnu.org @ 2020-05-26 17:09 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=95263

--- Comment #1 from Nathan Sidwell <nathan at gcc dot gnu.org> ---
Reduced:

template <typename> class TPL {
  template <int> using INT = int;
};

template <typename T> class Klass
{
public:
  template <int I> using ALIAS = typename TPL<T>::INT<I>;

  template <int> static void FUNC (); // OK

  template <int I, typename> static ALIAS<I> FUNC (); // SFINAE error
};

void Fn ()
{
  Klass<int>::FUNC<0> ();
}

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

* [Bug c++/95263] [11 Regression] ICE in lookup_template_class_1 since r11-504-g74744bb1f2847b5b
  2020-05-21 21:13 [Bug c++/95263] New: ice in lookup_template_class_1 dcb314 at hotmail dot com
                   ` (2 preceding siblings ...)
  2020-05-26 17:09 ` nathan at gcc dot gnu.org
@ 2020-05-27 13:59 ` cvs-commit at gcc dot gnu.org
  2020-10-07 14:36 ` nathan at gcc dot gnu.org
  4 siblings, 0 replies; 6+ messages in thread
From: cvs-commit at gcc dot gnu.org @ 2020-05-27 13:59 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=95263

--- Comment #2 from CVS Commits <cvs-commit at gcc dot gnu.org> ---
The master branch has been updated by Nathan Sidwell <nathan@gcc.gnu.org>:

https://gcc.gnu.org/g:ac9face8d26ea4b6aa72902ecc22e89ef00763c5

commit r11-661-gac9face8d26ea4b6aa72902ecc22e89ef00763c5
Author: Nathan Sidwell <nathan@acm.org>
Date:   Wed May 27 09:50:15 2020 -0400

    c++: Revert alias template change [pr95263]

    Turns out templates are more complicated than you think, even when you
    know they are more complicated than you think.  Reverting this change.

            PR c++/95263
            * pt.c (lookup_template_class_1): Restore alias template mutation.

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

* [Bug c++/95263] [11 Regression] ICE in lookup_template_class_1 since r11-504-g74744bb1f2847b5b
  2020-05-21 21:13 [Bug c++/95263] New: ice in lookup_template_class_1 dcb314 at hotmail dot com
                   ` (3 preceding siblings ...)
  2020-05-27 13:59 ` cvs-commit at gcc dot gnu.org
@ 2020-10-07 14:36 ` nathan at gcc dot gnu.org
  4 siblings, 0 replies; 6+ messages in thread
From: nathan at gcc dot gnu.org @ 2020-10-07 14:36 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=95263

Nathan Sidwell <nathan at gcc dot gnu.org> changed:

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

--- Comment #3 from Nathan Sidwell <nathan at gcc dot gnu.org> ---
forgot to mark resolved

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

end of thread, other threads:[~2020-10-07 14:36 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-05-21 21:13 [Bug c++/95263] New: ice in lookup_template_class_1 dcb314 at hotmail dot com
2020-05-21 21:36 ` [Bug c++/95263] [11 Regression] ICE in lookup_template_class_1 since r11-504-g74744bb1f2847b5b marxin at gcc dot gnu.org
2020-05-21 21:42 ` nathan at gcc dot gnu.org
2020-05-26 17:09 ` nathan at gcc dot gnu.org
2020-05-27 13:59 ` cvs-commit at gcc dot gnu.org
2020-10-07 14:36 ` nathan 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).