public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c++/99640] New: Internal compiler error: in lookup_template_class_1, at cp/pt.c:9895
@ 2021-03-18  7:15 fiesh at zefix dot tv
  2021-03-18 10:50 ` [Bug c++/99640] " jakub at gcc dot gnu.org
  0 siblings, 1 reply; 2+ messages in thread
From: fiesh at zefix dot tv @ 2021-03-18  7:15 UTC (permalink / raw)
  To: gcc-bugs

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

            Bug ID: 99640
           Summary: Internal compiler error: in lookup_template_class_1,
                    at cp/pt.c:9895
           Product: gcc
           Version: 10.2.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: c++
          Assignee: unassigned at gcc dot gnu.org
          Reporter: fiesh at zefix dot tv
  Target Milestone: ---

The following reduced code results in the internal compiler error mentioned in
the subject line:

---------------

class QVariantOutputArchive {
public:
  QVariantOutputArchive(int);
  template <typename...> void operator()() {
    {
      {
        {
          {
            {
              {
                {
                  {
                    {
                      {
                        {
                          {
                            {
                              {
                                [](auto) { operator(); };
                              }
                            }
                          }
                        }
                      }
                    }
                  }
                }
              }
            }
          }
        }
      }
    }
  }
};
template <typename, int> void qVariantArchiveTestVersioned() {
  int variant;
  QVariantOutputArchive oar(variant);
  oar();
}
void qVariantArchiveTest() { qVariantArchiveTestVersioned<int, true>; }


---------------

% c++ -c -std=c++17 zomg.ii
zomg.ii: In instantiation of ‘void QVariantOutputArchive::operator()() [with
<template-parameter-1-1> = {}]’:
zomg.ii:39:6:   required from ‘void qVariantArchiveTestVersioned() [with
<template-parameter-1-1> = int; int <anonymous> = 1]’
zomg.ii:41:69:   required from here
zomg.ii:19:44: internal compiler error: in lookup_template_class_1, at
cp/pt.c:9895
   19 |                                 [](auto) { operator(); };
      |                                            ^~~~~~~~~~
0x5c3a44 lookup_template_class_1                         
        /usr/src/debug/sys-devel/gcc-10.2.0-r5/gcc-10.2.0/gcc/cp/pt.c:9895
0x7399a5 lookup_template_class(tree_node*, tree_node*, tree_node*, tree_node*,
int, int)
        /usr/src/debug/sys-devel/gcc-10.2.0-r5/gcc-10.2.0/gcc/cp/pt.c:10118
0x7399a5 tsubst_aggr_type
        /usr/src/debug/sys-devel/gcc-10.2.0-r5/gcc-10.2.0/gcc/cp/pt.c:13400
0x734326 tsubst(tree_node*, tree_node*, int, tree_node*)
        /usr/src/debug/sys-devel/gcc-10.2.0-r5/gcc-10.2.0/gcc/cp/pt.c:15181
0x73114c tsubst_copy_and_build(tree_node*, tree_node*, int, tree_node*, bool,
bool)
        /usr/src/debug/sys-devel/gcc-10.2.0-r5/gcc-10.2.0/gcc/cp/pt.c:19302
0x730bcc tsubst_copy_and_build(tree_node*, tree_node*, int, tree_node*, bool,
bool)
        /usr/src/debug/sys-devel/gcc-10.2.0-r5/gcc-10.2.0/gcc/cp/pt.c:19160
0x730bcc tsubst_copy_and_build(tree_node*, tree_node*, int, tree_node*, bool,
bool)
        /usr/src/debug/sys-devel/gcc-10.2.0-r5/gcc-10.2.0/gcc/cp/pt.c:19281
0x731904 tsubst_copy_and_build(tree_node*, tree_node*, int, tree_node*, bool,
bool)
        /usr/src/debug/sys-devel/gcc-10.2.0-r5/gcc-10.2.0/gcc/cp/pt.c:20211
0x72a405 tsubst_copy_and_build(tree_node*, tree_node*, int, tree_node*, bool,
bool)
        /usr/src/debug/sys-devel/gcc-10.2.0-r5/gcc-10.2.0/gcc/cp/pt.c:19160
0x72a405 tsubst_expr(tree_node*, tree_node*, int, tree_node*, bool)
        /usr/src/debug/sys-devel/gcc-10.2.0-r5/gcc-10.2.0/gcc/cp/pt.c:18773
0x72bdb1 tsubst_expr(tree_node*, tree_node*, int, tree_node*, bool)
        /usr/src/debug/sys-devel/gcc-10.2.0-r5/gcc-10.2.0/gcc/cp/pt.c:17840
0x72bdb1 tsubst_expr(tree_node*, tree_node*, int, tree_node*, bool)    
        /usr/src/debug/sys-devel/gcc-10.2.0-r5/gcc-10.2.0/gcc/cp/pt.c:17885
0x72aeb8 tsubst_expr(tree_node*, tree_node*, int, tree_node*, bool)
        /usr/src/debug/sys-devel/gcc-10.2.0-r5/gcc-10.2.0/gcc/cp/pt.c:17840
0x72aeb8 tsubst_expr(tree_node*, tree_node*, int, tree_node*, bool)
        /usr/src/debug/sys-devel/gcc-10.2.0-r5/gcc-10.2.0/gcc/cp/pt.c:18174
0x72aeb8 tsubst_expr(tree_node*, tree_node*, int, tree_node*, bool)
        /usr/src/debug/sys-devel/gcc-10.2.0-r5/gcc-10.2.0/gcc/cp/pt.c:17840    
                                                                               
                                                                       
0x72aeb8 tsubst_expr(tree_node*, tree_node*, int, tree_node*, bool)            
                                                                               
                                                                               
/usr/src/debug/sys-devel/gcc-10.2.0-r5/gcc-10.2.0/gcc/cp/pt.c:18174            
                                                                               
                                                                0x72ff96
tsubst_expr(tree_node*, tree_node*, int, tree_node*, bool)                     
                                                                               
                                                                      
/usr/src/debug/sys-devel/gcc-10.2.0-r5/gcc-10.2.0/gcc/cp/pt.c:17840            
                                                                               
                                                                0x72ff96
tsubst_lambda_expr(tree_node*, tree_node*, int, tree_node*)          
        /usr/src/debug/sys-devel/gcc-10.2.0-r5/gcc-10.2.0/gcc/cp/pt.c:19113
0x7327c9 tsubst_copy_and_build(tree_node*, tree_node*, int, tree_node*, bool,
bool)
        /usr/src/debug/sys-devel/gcc-10.2.0-r5/gcc-10.2.0/gcc/cp/pt.c:20508
0x72a405 tsubst_copy_and_build(tree_node*, tree_node*, int, tree_node*, bool,
bool)
        /usr/src/debug/sys-devel/gcc-10.2.0-r5/gcc-10.2.0/gcc/cp/pt.c:19160
Please submit a full bug report,
with preprocessed source if appropriate.
Please include the complete backtrace with any bug report. 
See <https://bugs.gentoo.org/> for instructions.

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

* [Bug c++/99640] Internal compiler error: in lookup_template_class_1,  at cp/pt.c:9895
  2021-03-18  7:15 [Bug c++/99640] New: Internal compiler error: in lookup_template_class_1, at cp/pt.c:9895 fiesh at zefix dot tv
@ 2021-03-18 10:50 ` jakub at gcc dot gnu.org
  0 siblings, 0 replies; 2+ messages in thread
From: jakub at gcc dot gnu.org @ 2021-03-18 10:50 UTC (permalink / raw)
  To: gcc-bugs

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

Jakub Jelinek <jakub at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
         Resolution|---                         |DUPLICATE
             Status|UNCONFIRMED                 |RESOLVED
                 CC|                            |jakub at gcc dot gnu.org

--- Comment #1 from Jakub Jelinek <jakub at gcc dot gnu.org> ---
Started with r8-2720-gf44a8dd56f5bfbd0596c39693e268ef880c06221
Doesn't ICE anymore on the trunk starting with
r11-7418-g27f9a87886d48448f83e0e559dcf028b1a4a4ec6
but is rejected instead:
pr99640.C: In lambda function:
pr99640.C:19:44: error: statement cannot resolve address of overloaded function
   19 |                                 [](auto) { operator(); };
      |                                            ^~~~~~~~~~
pr99640.C: In instantiation of ‘void QVariantOutputArchive::operator()() [with
<template-parameter-1-1> = {}]’:
pr99640.C:39:6:   required from ‘void qVariantArchiveTestVersioned() [with
<template-parameter-1-1> = int; int <anonymous> = 1]’
pr99640.C:41:69:   required from here
pr99640.C:19:44: error: statement cannot resolve address of overloaded function
Thus, I think it is a dup.

*** This bug has been marked as a duplicate of bug 95451 ***

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

end of thread, other threads:[~2021-03-18 10:50 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-03-18  7:15 [Bug c++/99640] New: Internal compiler error: in lookup_template_class_1, at cp/pt.c:9895 fiesh at zefix dot tv
2021-03-18 10:50 ` [Bug c++/99640] " jakub 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).