public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c++/104608] New: internal compiler error: in cp_parser_template_id, at cp/parser.cc:18367
@ 2022-02-20 18:49 trpost at rocketmail dot com
  2022-02-20 22:46 ` [Bug c++/104608] " pinskia at gcc dot gnu.org
                   ` (7 more replies)
  0 siblings, 8 replies; 9+ messages in thread
From: trpost at rocketmail dot com @ 2022-02-20 18:49 UTC (permalink / raw)
  To: gcc-bugs

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

            Bug ID: 104608
           Summary: internal compiler error: in cp_parser_template_id, at
                    cp/parser.cc:18367
           Product: gcc
           Version: 12.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: c++
          Assignee: unassigned at gcc dot gnu.org
          Reporter: trpost at rocketmail dot com
  Target Milestone: ---

Hi all.

With gcc-12.0.1 in Fedora 37, i obtain:

make[2]: Leaving directory '/builddir/build/BUILD/COPASI-Build-251/build'
In file included from
/builddir/build/BUILD/COPASI-Build-251/copasi/math/CJitCompiler.h:15,
                 from
/builddir/build/BUILD/COPASI-Build-251/copasi/math/CMathContainer.h:35,
                 from
/builddir/build/BUILD/COPASI-Build-251/copasi/function/CEvaluationNodeOperator.cpp:35:
/usr/include/NativeJIT/Function.h: In constructor 'NativeJIT::Function<R, P1,
P2, P3, P4>::Function(Allocators::IAllocator&, NativeJIT::FunctionBuffer&)':
/usr/include/NativeJIT/Function.h:192:44: internal compiler error: in
cp_parser_template_id, at cp/parser.cc:18367
  192 |         m_p1 = &this->template Parameter<P1>(slotAllocator);
      |                                            ^
Please submit a full bug report, with preprocessed source (by using
-freport-bug).

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

* [Bug c++/104608] internal compiler error: in cp_parser_template_id, at cp/parser.cc:18367
  2022-02-20 18:49 [Bug c++/104608] New: internal compiler error: in cp_parser_template_id, at cp/parser.cc:18367 trpost at rocketmail dot com
@ 2022-02-20 22:46 ` pinskia at gcc dot gnu.org
  2022-02-21 20:53 ` trpost at rocketmail dot com
                   ` (6 subsequent siblings)
  7 siblings, 0 replies; 9+ messages in thread
From: pinskia at gcc dot gnu.org @ 2022-02-20 22:46 UTC (permalink / raw)
  To: gcc-bugs

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

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

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |WAITING
   Last reconfirmed|                            |2022-02-20
     Ever confirmed|0                           |1

--- Comment #1 from Andrew Pinski <pinskia at gcc dot gnu.org> ---
>Please submit a full bug report, with preprocessed source (by using -freport-bug).

Can you provide the preprocessed source as requested by the message?

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

* [Bug c++/104608] internal compiler error: in cp_parser_template_id, at cp/parser.cc:18367
  2022-02-20 18:49 [Bug c++/104608] New: internal compiler error: in cp_parser_template_id, at cp/parser.cc:18367 trpost at rocketmail dot com
  2022-02-20 22:46 ` [Bug c++/104608] " pinskia at gcc dot gnu.org
@ 2022-02-21 20:53 ` trpost at rocketmail dot com
  2022-02-21 20:56 ` pinskia at gcc dot gnu.org
                   ` (5 subsequent siblings)
  7 siblings, 0 replies; 9+ messages in thread
From: trpost at rocketmail dot com @ 2022-02-21 20:53 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #2 from Antonio Trande <trpost at rocketmail dot com> ---
Created attachment 52485
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=52485&action=edit
Bug report

Full bug report

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

* [Bug c++/104608] internal compiler error: in cp_parser_template_id, at cp/parser.cc:18367
  2022-02-20 18:49 [Bug c++/104608] New: internal compiler error: in cp_parser_template_id, at cp/parser.cc:18367 trpost at rocketmail dot com
  2022-02-20 22:46 ` [Bug c++/104608] " pinskia at gcc dot gnu.org
  2022-02-21 20:53 ` trpost at rocketmail dot com
@ 2022-02-21 20:56 ` pinskia at gcc dot gnu.org
  2022-02-21 21:46 ` pinskia at gcc dot gnu.org
                   ` (4 subsequent siblings)
  7 siblings, 0 replies; 9+ messages in thread
From: pinskia at gcc dot gnu.org @ 2022-02-21 20:56 UTC (permalink / raw)
  To: gcc-bugs

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

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

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|WAITING                     |UNCONFIRMED
     Ever confirmed|1                           |0

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

* [Bug c++/104608] internal compiler error: in cp_parser_template_id, at cp/parser.cc:18367
  2022-02-20 18:49 [Bug c++/104608] New: internal compiler error: in cp_parser_template_id, at cp/parser.cc:18367 trpost at rocketmail dot com
                   ` (2 preceding siblings ...)
  2022-02-21 20:56 ` pinskia at gcc dot gnu.org
@ 2022-02-21 21:46 ` pinskia at gcc dot gnu.org
  2022-02-21 23:02 ` [Bug c++/104608] [12 Regression] " pinskia at gcc dot gnu.org
                   ` (3 subsequent siblings)
  7 siblings, 0 replies; 9+ messages in thread
From: pinskia at gcc dot gnu.org @ 2022-02-21 21:46 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #3 from Andrew Pinski <pinskia at gcc dot gnu.org> ---
Reducing ...

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

* [Bug c++/104608] [12 Regression] internal compiler error: in cp_parser_template_id, at cp/parser.cc:18367
  2022-02-20 18:49 [Bug c++/104608] New: internal compiler error: in cp_parser_template_id, at cp/parser.cc:18367 trpost at rocketmail dot com
                   ` (3 preceding siblings ...)
  2022-02-21 21:46 ` pinskia at gcc dot gnu.org
@ 2022-02-21 23:02 ` pinskia at gcc dot gnu.org
  2022-02-22 19:45 ` mpolacek at gcc dot gnu.org
                   ` (2 subsequent siblings)
  7 siblings, 0 replies; 9+ messages in thread
From: pinskia at gcc dot gnu.org @ 2022-02-21 23:02 UTC (permalink / raw)
  To: gcc-bugs

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

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

           What    |Removed                     |Added
----------------------------------------------------------------------------
           Keywords|                            |ice-on-valid-code
   Last reconfirmed|2022-02-20 00:00:00         |2022-02-21
   Target Milestone|---                         |12.0
     Ever confirmed|0                           |1
             Status|UNCONFIRMED                 |NEW
            Summary|internal compiler error: in |[12 Regression] internal
                   |cp_parser_template_id, at   |compiler error: in
                   |cp/parser.cc:18367          |cp_parser_template_id, at
                   |                            |cp/parser.cc:18367

--- Comment #4 from Andrew Pinski <pinskia at gcc dot gnu.org> ---
Confirmed, reduced testcase:
class Parameter;
template <typename R> class Function 
: public R  
{
    Function();
};
template <typename R>
Function<R>::Function() {
    this->template Parameter<R>();
}
----- CUT ----
Note it is important that the forward declaration of the class Parameter is
there even.

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

* [Bug c++/104608] [12 Regression] internal compiler error: in cp_parser_template_id, at cp/parser.cc:18367
  2022-02-20 18:49 [Bug c++/104608] New: internal compiler error: in cp_parser_template_id, at cp/parser.cc:18367 trpost at rocketmail dot com
                   ` (4 preceding siblings ...)
  2022-02-21 23:02 ` [Bug c++/104608] [12 Regression] " pinskia at gcc dot gnu.org
@ 2022-02-22 19:45 ` mpolacek at gcc dot gnu.org
  2022-03-10 16:24 ` cvs-commit at gcc dot gnu.org
  2022-03-10 16:27 ` mpolacek at gcc dot gnu.org
  7 siblings, 0 replies; 9+ messages in thread
From: mpolacek at gcc dot gnu.org @ 2022-02-22 19:45 UTC (permalink / raw)
  To: gcc-bugs

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

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

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |mpolacek at gcc dot gnu.org
           Priority|P3                          |P1
           Assignee|unassigned at gcc dot gnu.org      |mpolacek at gcc dot gnu.org
             Status|NEW                         |ASSIGNED

--- Comment #5 from Marek Polacek <mpolacek at gcc dot gnu.org> ---
Started with r12-6754-g30f2c22def7392119f1ffaca30ef998b3b43f336

Taking.

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

* [Bug c++/104608] [12 Regression] internal compiler error: in cp_parser_template_id, at cp/parser.cc:18367
  2022-02-20 18:49 [Bug c++/104608] New: internal compiler error: in cp_parser_template_id, at cp/parser.cc:18367 trpost at rocketmail dot com
                   ` (5 preceding siblings ...)
  2022-02-22 19:45 ` mpolacek at gcc dot gnu.org
@ 2022-03-10 16:24 ` cvs-commit at gcc dot gnu.org
  2022-03-10 16:27 ` mpolacek at gcc dot gnu.org
  7 siblings, 0 replies; 9+ messages in thread
From: cvs-commit at gcc dot gnu.org @ 2022-03-10 16:24 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #6 from CVS Commits <cvs-commit at gcc dot gnu.org> ---
The trunk branch has been updated by Marek Polacek <mpolacek@gcc.gnu.org>:

https://gcc.gnu.org/g:4602a494e94835f693a9230adb69ce92249ebf15

commit r12-7601-g4602a494e94835f693a9230adb69ce92249ebf15
Author: Marek Polacek <polacek@redhat.com>
Date:   Tue Feb 22 15:03:34 2022 -0500

    c++: ->template and implicit typedef [PR104608]

    Here we have a forward declaration of Parameter for which we create
    an implicit typedef, which is a TYPE_DECL.  Then, when looking it up
    at template definition time, cp_parser_template_id gets (since r12-6754)
    this TYPE_DECL which it can't handle.

    This patch defers lookup for TYPE_DECLs that cp_parser_template_id can't
    handle, a la r12-6879.

            PR c++/104608

    gcc/cp/ChangeLog:

            * parser.cc (cp_parser_template_name): Repeat lookup of
            TYPE_DECLs.

    gcc/testsuite/ChangeLog:

            * g++.dg/parse/template-keyword3.C: New test.
            * g++.dg/parse/template-keyword4.C: New test.

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

* [Bug c++/104608] [12 Regression] internal compiler error: in cp_parser_template_id, at cp/parser.cc:18367
  2022-02-20 18:49 [Bug c++/104608] New: internal compiler error: in cp_parser_template_id, at cp/parser.cc:18367 trpost at rocketmail dot com
                   ` (6 preceding siblings ...)
  2022-03-10 16:24 ` cvs-commit at gcc dot gnu.org
@ 2022-03-10 16:27 ` mpolacek at gcc dot gnu.org
  7 siblings, 0 replies; 9+ messages in thread
From: mpolacek at gcc dot gnu.org @ 2022-03-10 16:27 UTC (permalink / raw)
  To: gcc-bugs

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

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

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

--- Comment #7 from Marek Polacek <mpolacek at gcc dot gnu.org> ---
Fixed.

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

end of thread, other threads:[~2022-03-10 16:27 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-02-20 18:49 [Bug c++/104608] New: internal compiler error: in cp_parser_template_id, at cp/parser.cc:18367 trpost at rocketmail dot com
2022-02-20 22:46 ` [Bug c++/104608] " pinskia at gcc dot gnu.org
2022-02-21 20:53 ` trpost at rocketmail dot com
2022-02-21 20:56 ` pinskia at gcc dot gnu.org
2022-02-21 21:46 ` pinskia at gcc dot gnu.org
2022-02-21 23:02 ` [Bug c++/104608] [12 Regression] " pinskia at gcc dot gnu.org
2022-02-22 19:45 ` mpolacek at gcc dot gnu.org
2022-03-10 16:24 ` cvs-commit at gcc dot gnu.org
2022-03-10 16:27 ` 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).