public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c++/96097] New: ICE in dependent_type_p, at cp/pt.c:26326
@ 2020-07-07 16:21 bruck.michael at gmail dot com
  2020-07-07 16:25 ` [Bug c++/96097] " bruck.michael at gmail dot com
                   ` (7 more replies)
  0 siblings, 8 replies; 9+ messages in thread
From: bruck.michael at gmail dot com @ 2020-07-07 16:21 UTC (permalink / raw)
  To: gcc-bugs

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

            Bug ID: 96097
           Summary: ICE in dependent_type_p, at cp/pt.c:26326
           Product: gcc
           Version: 10.1.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: c++
          Assignee: unassigned at gcc dot gnu.org
          Reporter: bruck.michael at gmail dot com
  Target Milestone: ---

https://gcc.godbolt.org/z/WVUAy5

Same error location as PR95931, but very different test case with valid code
(probably).

<source>: In function 'void test()':
<source>:17:22: internal compiler error: in dependent_type_p, at cp/pt.c:26343
   17 |     func<Y<X, 0>, Y>();
      |                      ^

Fails with -std=c++17 at least since gcc5.1

---
template <
    typename A,
    template <typename T, typename T::typeX> typename TA>
auto func()
{
    return TA<typename A::typeY, 0>{};
}

struct X { using typeX = int; };

template <typename T, int>
// template <typename T, typename T::typeX>  // works
struct Y { using typeY = T; };

void test()
{
    func<Y<X, 0>, Y>();
}
---

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

* [Bug c++/96097] ICE in dependent_type_p, at cp/pt.c:26326
  2020-07-07 16:21 [Bug c++/96097] New: ICE in dependent_type_p, at cp/pt.c:26326 bruck.michael at gmail dot com
@ 2020-07-07 16:25 ` bruck.michael at gmail dot com
  2020-07-08  7:27 ` marxin at gcc dot gnu.org
                   ` (6 subsequent siblings)
  7 siblings, 0 replies; 9+ messages in thread
From: bruck.michael at gmail dot com @ 2020-07-07 16:25 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #1 from Michael Bruck <bruck.michael at gmail dot com> ---
trunk:
internal compiler error: in dependent_type_p, at cp/pt.c:26326

10.1:
internal compiler error: in dependent_type_p, at cp/pt.c:26343

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

* [Bug c++/96097] ICE in dependent_type_p, at cp/pt.c:26326
  2020-07-07 16:21 [Bug c++/96097] New: ICE in dependent_type_p, at cp/pt.c:26326 bruck.michael at gmail dot com
  2020-07-07 16:25 ` [Bug c++/96097] " bruck.michael at gmail dot com
@ 2020-07-08  7:27 ` marxin at gcc dot gnu.org
  2020-07-08  8:11 ` haoxintu at gmail dot com
                   ` (5 subsequent siblings)
  7 siblings, 0 replies; 9+ messages in thread
From: marxin at gcc dot gnu.org @ 2020-07-08  7:27 UTC (permalink / raw)
  To: gcc-bugs

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

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

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |NEW
     Ever confirmed|0                           |1
   Last reconfirmed|                            |2020-07-08
                 CC|                            |jason at gcc dot gnu.org,
                   |                            |marxin at gcc dot gnu.org,
                   |                            |mpolacek at gcc dot gnu.org

--- Comment #2 from Martin Liška <marxin at gcc dot gnu.org> ---
Confirmed, clang accepts the code. GCC ICEs for all revisions.

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

* [Bug c++/96097] ICE in dependent_type_p, at cp/pt.c:26326
  2020-07-07 16:21 [Bug c++/96097] New: ICE in dependent_type_p, at cp/pt.c:26326 bruck.michael at gmail dot com
  2020-07-07 16:25 ` [Bug c++/96097] " bruck.michael at gmail dot com
  2020-07-08  7:27 ` marxin at gcc dot gnu.org
@ 2020-07-08  8:11 ` haoxintu at gmail dot com
  2020-07-08 19:04 ` mpolacek at gcc dot gnu.org
                   ` (4 subsequent siblings)
  7 siblings, 0 replies; 9+ messages in thread
From: haoxintu at gmail dot com @ 2020-07-08  8:11 UTC (permalink / raw)
  To: gcc-bugs

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

Haoxin Tu <haoxintu at gmail dot com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |haoxintu at gmail dot com

--- Comment #3 from Haoxin Tu <haoxintu at gmail dot com> ---
(In reply to Martin Liška from comment #2)
> Confirmed, clang accepts the code. GCC ICEs for all revisions.

Hi,

I just realized I have reported an ice-on-invalid version in bug 95931 with the
same symptom in the trunk. Maybe you can consider them together.

Thanks,
Haoxin

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

* [Bug c++/96097] ICE in dependent_type_p, at cp/pt.c:26326
  2020-07-07 16:21 [Bug c++/96097] New: ICE in dependent_type_p, at cp/pt.c:26326 bruck.michael at gmail dot com
                   ` (2 preceding siblings ...)
  2020-07-08  8:11 ` haoxintu at gmail dot com
@ 2020-07-08 19:04 ` mpolacek at gcc dot gnu.org
  2020-07-08 23:40 ` bruck.michael at gmail dot com
                   ` (3 subsequent siblings)
  7 siblings, 0 replies; 9+ messages in thread
From: mpolacek at gcc dot gnu.org @ 2020-07-08 19:04 UTC (permalink / raw)
  To: gcc-bugs

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

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

           What    |Removed                     |Added
----------------------------------------------------------------------------
           See Also|                            |https://gcc.gnu.org/bugzill
                   |                            |a/show_bug.cgi?id=90782

--- Comment #4 from Marek Polacek <mpolacek at gcc dot gnu.org> ---
Looks like a dup of bug 90782.

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

* [Bug c++/96097] ICE in dependent_type_p, at cp/pt.c:26326
  2020-07-07 16:21 [Bug c++/96097] New: ICE in dependent_type_p, at cp/pt.c:26326 bruck.michael at gmail dot com
                   ` (3 preceding siblings ...)
  2020-07-08 19:04 ` mpolacek at gcc dot gnu.org
@ 2020-07-08 23:40 ` bruck.michael at gmail dot com
  2020-10-29 15:10 ` mpolacek at gcc dot gnu.org
                   ` (2 subsequent siblings)
  7 siblings, 0 replies; 9+ messages in thread
From: bruck.michael at gmail dot com @ 2020-07-08 23:40 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #5 from Michael Bruck <bruck.michael at gmail dot com> ---
Further simplified code

template <template <typename T, typename T::type> typename>
void func() {}

template <typename, int>
struct Y {};

void test()
{
    func<Y>();
}

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

* [Bug c++/96097] ICE in dependent_type_p, at cp/pt.c:26326
  2020-07-07 16:21 [Bug c++/96097] New: ICE in dependent_type_p, at cp/pt.c:26326 bruck.michael at gmail dot com
                   ` (4 preceding siblings ...)
  2020-07-08 23:40 ` bruck.michael at gmail dot com
@ 2020-10-29 15:10 ` mpolacek at gcc dot gnu.org
  2020-10-29 15:12 ` mpolacek at gcc dot gnu.org
  2020-10-29 15:17 ` mpolacek at gcc dot gnu.org
  7 siblings, 0 replies; 9+ messages in thread
From: mpolacek at gcc dot gnu.org @ 2020-10-29 15:10 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #6 from Marek Polacek <mpolacek at gcc dot gnu.org> ---
*** Bug 95931 has been marked as a duplicate of this bug. ***

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

* [Bug c++/96097] ICE in dependent_type_p, at cp/pt.c:26326
  2020-07-07 16:21 [Bug c++/96097] New: ICE in dependent_type_p, at cp/pt.c:26326 bruck.michael at gmail dot com
                   ` (5 preceding siblings ...)
  2020-10-29 15:10 ` mpolacek at gcc dot gnu.org
@ 2020-10-29 15:12 ` mpolacek at gcc dot gnu.org
  2020-10-29 15:17 ` mpolacek at gcc dot gnu.org
  7 siblings, 0 replies; 9+ messages in thread
From: mpolacek at gcc dot gnu.org @ 2020-10-29 15:12 UTC (permalink / raw)
  To: gcc-bugs

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

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

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |eugene at hutorny dot in.ua

--- Comment #7 from Marek Polacek <mpolacek at gcc dot gnu.org> ---
*** Bug 97624 has been marked as a duplicate of this bug. ***

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

* [Bug c++/96097] ICE in dependent_type_p, at cp/pt.c:26326
  2020-07-07 16:21 [Bug c++/96097] New: ICE in dependent_type_p, at cp/pt.c:26326 bruck.michael at gmail dot com
                   ` (6 preceding siblings ...)
  2020-10-29 15:12 ` mpolacek at gcc dot gnu.org
@ 2020-10-29 15:17 ` mpolacek at gcc dot gnu.org
  7 siblings, 0 replies; 9+ messages in thread
From: mpolacek at gcc dot gnu.org @ 2020-10-29 15:17 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #8 from Marek Polacek <mpolacek at gcc dot gnu.org> ---
Here, make_typename_type is called when tsubsting, i.e. p_t_d is 0, and it
calls dependent_scope_p with a dependent type.  We might need ++ptd/--ptd
around the call to make_typename_type.

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

end of thread, other threads:[~2020-10-29 15:17 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-07-07 16:21 [Bug c++/96097] New: ICE in dependent_type_p, at cp/pt.c:26326 bruck.michael at gmail dot com
2020-07-07 16:25 ` [Bug c++/96097] " bruck.michael at gmail dot com
2020-07-08  7:27 ` marxin at gcc dot gnu.org
2020-07-08  8:11 ` haoxintu at gmail dot com
2020-07-08 19:04 ` mpolacek at gcc dot gnu.org
2020-07-08 23:40 ` bruck.michael at gmail dot com
2020-10-29 15:10 ` mpolacek at gcc dot gnu.org
2020-10-29 15:12 ` mpolacek at gcc dot gnu.org
2020-10-29 15:17 ` mpolacek 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).