public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c++/95982] New: ICE with non-type template parameter that is itself the instantiation of a template
@ 2020-06-29 18:18 bence.kodaj at gmail dot com
  2020-06-29 18:27 ` [Bug c++/95982] " bence.kodaj at gmail dot com
                   ` (6 more replies)
  0 siblings, 7 replies; 8+ messages in thread
From: bence.kodaj at gmail dot com @ 2020-06-29 18:18 UTC (permalink / raw)
  To: gcc-bugs

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

            Bug ID: 95982
           Summary: ICE with non-type template parameter that is itself
                    the instantiation of a template
           Product: gcc
           Version: 10.1.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: c++
          Assignee: unassigned at gcc dot gnu.org
          Reporter: bence.kodaj at gmail dot com
  Target Milestone: ---

The code below causes an ICE saying "unexpected expression ‘<anonymous>’ of
kind template_parm_index".
OS: Ubuntu 18.04
g++ version: 10.1.0
Wandbox URL: https://wandbox.org/permlink/A9ImqBRe5vyZMFWC#

---------------------------
#include <type_traits>

template< typename, template< auto > typename >
struct IsImplementationOf : std::false_type {};

template< template< auto > typename Template, auto Arg >
struct IsImplementationOf< Template< Arg >, Template > : std::true_type {};

template< typename T >
struct X {
    constexpr X( T ) {}
};

template< X > struct Y {};

int main()
{
    static_assert( IsImplementationOf< Y< X(0) >, Y > );

    return 0;
}
---------------------------

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

* [Bug c++/95982] ICE with non-type template parameter that is itself the instantiation of a template
  2020-06-29 18:18 [Bug c++/95982] New: ICE with non-type template parameter that is itself the instantiation of a template bence.kodaj at gmail dot com
@ 2020-06-29 18:27 ` bence.kodaj at gmail dot com
  2020-06-29 18:28 ` bence.kodaj at gmail dot com
                   ` (5 subsequent siblings)
  6 siblings, 0 replies; 8+ messages in thread
From: bence.kodaj at gmail dot com @ 2020-06-29 18:27 UTC (permalink / raw)
  To: gcc-bugs

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

Bence Kodaj <bence.kodaj at gmail dot com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                URL|https://wandbox.org/permlin |https://godbolt.org/z/6BpK2
                   |k/A9ImqBRe5vyZMFWC          |9

--- Comment #1 from Bence Kodaj <bence.kodaj at gmail dot com> ---
Sorry, there's a typo in the code - here's the fixed version.
Godbolt URL: https://godbolt.org/z/6BpK29

---------------------------
#include <type_traits>

template< typename, template< auto > typename >
struct IsImplementationOf : std::false_type {};

template< template< auto > typename Template, auto Arg >
struct IsImplementationOf< Template< Arg >, Template > : std::true_type {};

template< typename T >
struct X {
    constexpr X( T ) {}
};

template< X > struct Y {};

int main()
{
    static_assert( IsImplementationOf< Y< X(0) >, Y >::value );

    return 0;
}
---------------------------

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

* [Bug c++/95982] ICE with non-type template parameter that is itself the instantiation of a template
  2020-06-29 18:18 [Bug c++/95982] New: ICE with non-type template parameter that is itself the instantiation of a template bence.kodaj at gmail dot com
  2020-06-29 18:27 ` [Bug c++/95982] " bence.kodaj at gmail dot com
@ 2020-06-29 18:28 ` bence.kodaj at gmail dot com
  2020-07-08 22:52 ` [Bug c++/95982] [10 Regression] " mpolacek at gcc dot gnu.org
                   ` (4 subsequent siblings)
  6 siblings, 0 replies; 8+ messages in thread
From: bence.kodaj at gmail dot com @ 2020-06-29 18:28 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #2 from Bence Kodaj <bence.kodaj at gmail dot com> ---
Note: the ICE goes away if I remove the -Wall option.

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

* [Bug c++/95982] [10 Regression] ICE with non-type template parameter that is itself the instantiation of a template
  2020-06-29 18:18 [Bug c++/95982] New: ICE with non-type template parameter that is itself the instantiation of a template bence.kodaj at gmail dot com
  2020-06-29 18:27 ` [Bug c++/95982] " bence.kodaj at gmail dot com
  2020-06-29 18:28 ` bence.kodaj at gmail dot com
@ 2020-07-08 22:52 ` mpolacek at gcc dot gnu.org
  2020-07-23  6:52 ` rguenth at gcc dot gnu.org
                   ` (3 subsequent siblings)
  6 siblings, 0 replies; 8+ messages in thread
From: mpolacek at gcc dot gnu.org @ 2020-07-08 22:52 UTC (permalink / raw)
  To: gcc-bugs

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

Marek Polacek <mpolacek at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |mpolacek at gcc dot gnu.org
   Target Milestone|---                         |10.2
             Status|UNCONFIRMED                 |NEW
     Ever confirmed|0                           |1
      Known to work|                            |9.3.0
            Summary|ICE with non-type template  |[10 Regression] ICE with
                   |parameter that is itself    |non-type template parameter
                   |the instantiation of a      |that is itself the
                   |template                    |instantiation of a template
   Last reconfirmed|                            |2020-07-08
      Known to fail|                            |10.1.0

--- Comment #3 from Marek Polacek <mpolacek at gcc dot gnu.org> ---
Fixed on trunk with r11-1860-g67a493a0b9e7ce6caba4b8bedf1f3295e477ec00.

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

* [Bug c++/95982] [10 Regression] ICE with non-type template parameter that is itself the instantiation of a template
  2020-06-29 18:18 [Bug c++/95982] New: ICE with non-type template parameter that is itself the instantiation of a template bence.kodaj at gmail dot com
                   ` (2 preceding siblings ...)
  2020-07-08 22:52 ` [Bug c++/95982] [10 Regression] " mpolacek at gcc dot gnu.org
@ 2020-07-23  6:52 ` rguenth at gcc dot gnu.org
  2021-04-08 12:02 ` rguenth at gcc dot gnu.org
                   ` (2 subsequent siblings)
  6 siblings, 0 replies; 8+ messages in thread
From: rguenth at gcc dot gnu.org @ 2020-07-23  6:52 UTC (permalink / raw)
  To: gcc-bugs

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

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

           What    |Removed                     |Added
----------------------------------------------------------------------------
   Target Milestone|10.2                        |10.3

--- Comment #4 from Richard Biener <rguenth at gcc dot gnu.org> ---
GCC 10.2 is released, adjusting target milestone.

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

* [Bug c++/95982] [10 Regression] ICE with non-type template parameter that is itself the instantiation of a template
  2020-06-29 18:18 [Bug c++/95982] New: ICE with non-type template parameter that is itself the instantiation of a template bence.kodaj at gmail dot com
                   ` (3 preceding siblings ...)
  2020-07-23  6:52 ` rguenth at gcc dot gnu.org
@ 2021-04-08 12:02 ` rguenth at gcc dot gnu.org
  2021-11-11 14:38 ` bence.kodaj at gmail dot com
  2022-05-11 16:49 ` bence.kodaj at gmail dot com
  6 siblings, 0 replies; 8+ messages in thread
From: rguenth at gcc dot gnu.org @ 2021-04-08 12:02 UTC (permalink / raw)
  To: gcc-bugs

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

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

           What    |Removed                     |Added
----------------------------------------------------------------------------
   Target Milestone|10.3                        |10.4

--- Comment #5 from Richard Biener <rguenth at gcc dot gnu.org> ---
GCC 10.3 is being released, retargeting bugs to GCC 10.4.

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

* [Bug c++/95982] [10 Regression] ICE with non-type template parameter that is itself the instantiation of a template
  2020-06-29 18:18 [Bug c++/95982] New: ICE with non-type template parameter that is itself the instantiation of a template bence.kodaj at gmail dot com
                   ` (4 preceding siblings ...)
  2021-04-08 12:02 ` rguenth at gcc dot gnu.org
@ 2021-11-11 14:38 ` bence.kodaj at gmail dot com
  2022-05-11 16:49 ` bence.kodaj at gmail dot com
  6 siblings, 0 replies; 8+ messages in thread
From: bence.kodaj at gmail dot com @ 2021-11-11 14:38 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #6 from Bence Kodaj <bence.kodaj at gmail dot com> ---
For what it's worth, the bug is no longer present in gcc 11.1.

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

* [Bug c++/95982] [10 Regression] ICE with non-type template parameter that is itself the instantiation of a template
  2020-06-29 18:18 [Bug c++/95982] New: ICE with non-type template parameter that is itself the instantiation of a template bence.kodaj at gmail dot com
                   ` (5 preceding siblings ...)
  2021-11-11 14:38 ` bence.kodaj at gmail dot com
@ 2022-05-11 16:49 ` bence.kodaj at gmail dot com
  6 siblings, 0 replies; 8+ messages in thread
From: bence.kodaj at gmail dot com @ 2022-05-11 16:49 UTC (permalink / raw)
  To: gcc-bugs

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

Bence Kodaj <bence.kodaj at gmail dot com> changed:

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

--- Comment #7 from Bence Kodaj <bence.kodaj at gmail dot com> ---
Fixed in GCC 11.1.

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

end of thread, other threads:[~2022-05-11 16:49 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-06-29 18:18 [Bug c++/95982] New: ICE with non-type template parameter that is itself the instantiation of a template bence.kodaj at gmail dot com
2020-06-29 18:27 ` [Bug c++/95982] " bence.kodaj at gmail dot com
2020-06-29 18:28 ` bence.kodaj at gmail dot com
2020-07-08 22:52 ` [Bug c++/95982] [10 Regression] " mpolacek at gcc dot gnu.org
2020-07-23  6:52 ` rguenth at gcc dot gnu.org
2021-04-08 12:02 ` rguenth at gcc dot gnu.org
2021-11-11 14:38 ` bence.kodaj at gmail dot com
2022-05-11 16:49 ` bence.kodaj at gmail 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).