public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c++/110409] New: ICE on explicit instantiation of undefined template
@ 2023-06-26  8:35 stevenxia990430 at gmail dot com
  2023-06-26 20:12 ` [Bug c++/110409] " pinskia at gcc dot gnu.org
  2023-06-26 20:41 ` stevenxia990430 at gmail dot com
  0 siblings, 2 replies; 3+ messages in thread
From: stevenxia990430 at gmail dot com @ 2023-06-26  8:35 UTC (permalink / raw)
  To: gcc-bugs

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

            Bug ID: 110409
           Summary: ICE on explicit instantiation of undefined template
           Product: gcc
           Version: 12.1.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: c++
          Assignee: unassigned at gcc dot gnu.org
          Reporter: stevenxia990430 at gmail dot com
  Target Milestone: ---

The following invalid program reports an internal compiler error: tree check:
accessed elt 2 of 'tree_vec' with 1 elts in tsubst, at cp/pt.cc:16072 on
gcc-trunk

To quickly reproduce: https://gcc.godbolt.org/z/4KcExh49f
```
template <typename E, typename F>
    struct expected3 {};
template <typename E>
    struct expected3<E, E>;
template <typename R, typename E>
    struct expected3<R, R> {};
template struct expected3<int, int>;

int main() {
    return 0;
}
```

Note after removing `template struct expected3<int, int>;` and this invalid
program:

```
template <typename E, typename F>
    struct expected3 {};
template <typename E>
    struct expected3<E, E>;
template <typename R, typename E>
    struct expected3<R, R> {};

int main() {
    return 0;
}
```
compiles successfully on gcc-trunk but is rejected on clang-trunk. See this
link: https://gcc.godbolt.org/z/9rP3vYW6o

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

* [Bug c++/110409] ICE on explicit instantiation of undefined template
  2023-06-26  8:35 [Bug c++/110409] New: ICE on explicit instantiation of undefined template stevenxia990430 at gmail dot com
@ 2023-06-26 20:12 ` pinskia at gcc dot gnu.org
  2023-06-26 20:41 ` stevenxia990430 at gmail dot com
  1 sibling, 0 replies; 3+ messages in thread
From: pinskia at gcc dot gnu.org @ 2023-06-26 20:12 UTC (permalink / raw)
  To: gcc-bugs

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

Andrew Pinski <pinskia at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
   Last reconfirmed|                            |2023-06-26
             Status|UNCONFIRMED                 |NEW
     Ever confirmed|0                           |1

--- Comment #1 from Andrew Pinski <pinskia at gcc dot gnu.org> ---
Confirmed. There are a few related issues (which I linked already) but I am not
sure if any are an exact dup of this one though fixing one of them might fix
this one too ...

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

* [Bug c++/110409] ICE on explicit instantiation of undefined template
  2023-06-26  8:35 [Bug c++/110409] New: ICE on explicit instantiation of undefined template stevenxia990430 at gmail dot com
  2023-06-26 20:12 ` [Bug c++/110409] " pinskia at gcc dot gnu.org
@ 2023-06-26 20:41 ` stevenxia990430 at gmail dot com
  1 sibling, 0 replies; 3+ messages in thread
From: stevenxia990430 at gmail dot com @ 2023-06-26 20:41 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #2 from Steven Xia <stevenxia990430 at gmail dot com> ---
Noted, thanks!

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

end of thread, other threads:[~2023-06-26 20:41 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-06-26  8:35 [Bug c++/110409] New: ICE on explicit instantiation of undefined template stevenxia990430 at gmail dot com
2023-06-26 20:12 ` [Bug c++/110409] " pinskia at gcc dot gnu.org
2023-06-26 20:41 ` stevenxia990430 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).