public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c++/105006] New: ice: tree check: expected function_decl, have using_decl in maybe_push_used_methods, at cp/class.cc:1325
@ 2022-03-21 18:39 dcb314 at hotmail dot com
  2022-03-21 18:41 ` [Bug c++/105006] " dcb314 at hotmail dot com
                   ` (6 more replies)
  0 siblings, 7 replies; 8+ messages in thread
From: dcb314 at hotmail dot com @ 2022-03-21 18:39 UTC (permalink / raw)
  To: gcc-bugs

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

            Bug ID: 105006
           Summary: ice: tree check: expected function_decl, have
                    using_decl in maybe_push_used_methods, at
                    cp/class.cc:1325
           Product: gcc
           Version: 12.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: c++
          Assignee: unassigned at gcc dot gnu.org
          Reporter: dcb314 at hotmail dot com
  Target Milestone: ---

For this C++ code:

emplate <typename eT> class Row {
  eT ::operator();
  void operator()();
  template <long> class fixed;
};
template <typename eT> template <int> class Row<eT>::fixed : Row {
  Row::operator();
};

compiled by recent gcc trunk does this:

bug799.cc:2:3: warning: access declarations are deprecated in favour of
using-declarations; suggestion: add the ‘using’ keyword [-Wdeprecated]
    2 |   eT ::operator();
      |   ^~
bug799.cc:7:17: internal compiler error: tree check: expected function_decl,
have using_decl in maybe_push_used_met
hods, at cp/class.cc:1325
    7 |   Row::operator();
      |                 ^
0x13a8ce6 tree_check_failed(tree_node const*, char const*, int, char const*,
...)
        ../../trunk.git/gcc/tree.cc:8724
0x6cdcc5 maybe_push_used_methods(tree_node*)
        ../../trunk.git/gcc/cp/class.cc:0

The bug first seems to occur sometime between git hash 3a7ba8fd0cda3878
and 2663d18356b0a62f, a distance of 33 commits.

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

* [Bug c++/105006] ice: tree check: expected function_decl, have using_decl in maybe_push_used_methods, at cp/class.cc:1325
  2022-03-21 18:39 [Bug c++/105006] New: ice: tree check: expected function_decl, have using_decl in maybe_push_used_methods, at cp/class.cc:1325 dcb314 at hotmail dot com
@ 2022-03-21 18:41 ` dcb314 at hotmail dot com
  2022-03-21 18:48 ` [Bug c++/105006] [12 Regression] " ppalka at gcc dot gnu.org
                   ` (5 subsequent siblings)
  6 siblings, 0 replies; 8+ messages in thread
From: dcb314 at hotmail dot com @ 2022-03-21 18:41 UTC (permalink / raw)
  To: gcc-bugs

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

David Binderman <dcb314 at hotmail dot com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |jason at gcc dot gnu.org

--- Comment #1 from David Binderman <dcb314 at hotmail dot com> ---
First word of the source code should be template, of course.

I suspect Jason might be able to help with this one.

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

* [Bug c++/105006] [12 Regression] ice: tree check: expected function_decl, have using_decl in maybe_push_used_methods, at cp/class.cc:1325
  2022-03-21 18:39 [Bug c++/105006] New: ice: tree check: expected function_decl, have using_decl in maybe_push_used_methods, at cp/class.cc:1325 dcb314 at hotmail dot com
  2022-03-21 18:41 ` [Bug c++/105006] " dcb314 at hotmail dot com
@ 2022-03-21 18:48 ` ppalka at gcc dot gnu.org
  2022-03-22  8:25 ` rguenth at gcc dot gnu.org
                   ` (4 subsequent siblings)
  6 siblings, 0 replies; 8+ messages in thread
From: ppalka at gcc dot gnu.org @ 2022-03-21 18:48 UTC (permalink / raw)
  To: gcc-bugs

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

Patrick Palka <ppalka at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
           Keywords|                            |ice-on-valid-code
            Summary|ice: tree check: expected   |[12 Regression] ice: tree
                   |function_decl, have         |check: expected
                   |using_decl in               |function_decl, have
                   |maybe_push_used_methods, at |using_decl in
                   |cp/class.cc:1325            |maybe_push_used_methods, at
                   |                            |cp/class.cc:1325
                 CC|                            |ppalka at gcc dot gnu.org
             Status|UNCONFIRMED                 |NEW
   Target Milestone|---                         |12.0
           See Also|                            |https://gcc.gnu.org/bugzill
                   |                            |a/show_bug.cgi?id=104476
     Ever confirmed|0                           |1
   Last reconfirmed|                            |2022-03-21

--- Comment #2 from Patrick Palka <ppalka at gcc dot gnu.org> ---
Started with r12-7714-g47da5198766256.  Further reduced:

template<class eT>
class Row {
  using eT::operator();
  void operator()();
  class fixed;
};

template<class eT>
class Row<eT>::fixed : Row {
  using Row::operator();
};

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

* [Bug c++/105006] [12 Regression] ice: tree check: expected function_decl, have using_decl in maybe_push_used_methods, at cp/class.cc:1325
  2022-03-21 18:39 [Bug c++/105006] New: ice: tree check: expected function_decl, have using_decl in maybe_push_used_methods, at cp/class.cc:1325 dcb314 at hotmail dot com
  2022-03-21 18:41 ` [Bug c++/105006] " dcb314 at hotmail dot com
  2022-03-21 18:48 ` [Bug c++/105006] [12 Regression] " ppalka at gcc dot gnu.org
@ 2022-03-22  8:25 ` rguenth at gcc dot gnu.org
  2022-03-22 15:09 ` jason at gcc dot gnu.org
                   ` (3 subsequent siblings)
  6 siblings, 0 replies; 8+ messages in thread
From: rguenth at gcc dot gnu.org @ 2022-03-22  8:25 UTC (permalink / raw)
  To: gcc-bugs

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

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

           What    |Removed                     |Added
----------------------------------------------------------------------------
           Priority|P3                          |P1

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

* [Bug c++/105006] [12 Regression] ice: tree check: expected function_decl, have using_decl in maybe_push_used_methods, at cp/class.cc:1325
  2022-03-21 18:39 [Bug c++/105006] New: ice: tree check: expected function_decl, have using_decl in maybe_push_used_methods, at cp/class.cc:1325 dcb314 at hotmail dot com
                   ` (2 preceding siblings ...)
  2022-03-22  8:25 ` rguenth at gcc dot gnu.org
@ 2022-03-22 15:09 ` jason at gcc dot gnu.org
  2022-03-23 12:56 ` cvs-commit at gcc dot gnu.org
                   ` (2 subsequent siblings)
  6 siblings, 0 replies; 8+ messages in thread
From: jason at gcc dot gnu.org @ 2022-03-22 15:09 UTC (permalink / raw)
  To: gcc-bugs

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

Jason Merrill <jason at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
           Assignee|unassigned at gcc dot gnu.org      |jason at gcc dot gnu.org
             Status|NEW                         |ASSIGNED

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

* [Bug c++/105006] [12 Regression] ice: tree check: expected function_decl, have using_decl in maybe_push_used_methods, at cp/class.cc:1325
  2022-03-21 18:39 [Bug c++/105006] New: ice: tree check: expected function_decl, have using_decl in maybe_push_used_methods, at cp/class.cc:1325 dcb314 at hotmail dot com
                   ` (3 preceding siblings ...)
  2022-03-22 15:09 ` jason at gcc dot gnu.org
@ 2022-03-23 12:56 ` cvs-commit at gcc dot gnu.org
  2022-03-23 17:17 ` cvs-commit at gcc dot gnu.org
  2022-03-24 16:39 ` jason at gcc dot gnu.org
  6 siblings, 0 replies; 8+ messages in thread
From: cvs-commit at gcc dot gnu.org @ 2022-03-23 12:56 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #3 from CVS Commits <cvs-commit at gcc dot gnu.org> ---
The master branch has been updated by Jason Merrill <jason@gcc.gnu.org>:

https://gcc.gnu.org/g:a3f78748fab6b24e3d4a8b319afd3f8afa17248f

commit r12-7784-ga3f78748fab6b24e3d4a8b319afd3f8afa17248f
Author: Jason Merrill <jason@redhat.com>
Date:   Tue Mar 22 11:17:26 2022 -0400

    c++: using from enclosing class template [PR105006]

    Here, DECL_DEPENDENT_P was false for the second using because Row<eT> is
    "the current instantiation", so lookup succeeds.  But since Row itself has
a
    dependent using-decl for operator(), the set of functions imported by the
    second using is dependent, so we should set the flag.

            PR c++/105006

    gcc/cp/ChangeLog:

            * name-lookup.cc (lookup_using_decl): Set DECL_DEPENDENT_P if
lookup
            finds a dependent using.

    gcc/testsuite/ChangeLog:

            * g++.dg/template/using30.C: New test.

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

* [Bug c++/105006] [12 Regression] ice: tree check: expected function_decl, have using_decl in maybe_push_used_methods, at cp/class.cc:1325
  2022-03-21 18:39 [Bug c++/105006] New: ice: tree check: expected function_decl, have using_decl in maybe_push_used_methods, at cp/class.cc:1325 dcb314 at hotmail dot com
                   ` (4 preceding siblings ...)
  2022-03-23 12:56 ` cvs-commit at gcc dot gnu.org
@ 2022-03-23 17:17 ` cvs-commit at gcc dot gnu.org
  2022-03-24 16:39 ` jason at gcc dot gnu.org
  6 siblings, 0 replies; 8+ messages in thread
From: cvs-commit at gcc dot gnu.org @ 2022-03-23 17:17 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #4 from CVS Commits <cvs-commit at gcc dot gnu.org> ---
The master branch has been updated by Jason Merrill <jason@gcc.gnu.org>:

https://gcc.gnu.org/g:e8cd3edc0fc6c02a732dcecf519c22d835e5f422

commit r12-7788-ge8cd3edc0fc6c02a732dcecf519c22d835e5f422
Author: Jason Merrill <jason@redhat.com>
Date:   Wed Mar 23 12:22:20 2022 -0400

    c++: tweak PR105006 fix

    Checking dependent_type_p avoids needing to walk the overloads in cases
    where it would not be possible to find a dependent using.

            PR c++/105006

    gcc/cp/ChangeLog:

            * name-lookup.cc (lookup_using_decl): Check that scope is
            a dependent type before looking for dependent using.

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

* [Bug c++/105006] [12 Regression] ice: tree check: expected function_decl, have using_decl in maybe_push_used_methods, at cp/class.cc:1325
  2022-03-21 18:39 [Bug c++/105006] New: ice: tree check: expected function_decl, have using_decl in maybe_push_used_methods, at cp/class.cc:1325 dcb314 at hotmail dot com
                   ` (5 preceding siblings ...)
  2022-03-23 17:17 ` cvs-commit at gcc dot gnu.org
@ 2022-03-24 16:39 ` jason at gcc dot gnu.org
  6 siblings, 0 replies; 8+ messages in thread
From: jason at gcc dot gnu.org @ 2022-03-24 16:39 UTC (permalink / raw)
  To: gcc-bugs

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

Jason Merrill <jason at gcc dot gnu.org> changed:

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

--- Comment #5 from Jason Merrill <jason at gcc dot gnu.org> ---
Fixed

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

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

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-03-21 18:39 [Bug c++/105006] New: ice: tree check: expected function_decl, have using_decl in maybe_push_used_methods, at cp/class.cc:1325 dcb314 at hotmail dot com
2022-03-21 18:41 ` [Bug c++/105006] " dcb314 at hotmail dot com
2022-03-21 18:48 ` [Bug c++/105006] [12 Regression] " ppalka at gcc dot gnu.org
2022-03-22  8:25 ` rguenth at gcc dot gnu.org
2022-03-22 15:09 ` jason at gcc dot gnu.org
2022-03-23 12:56 ` cvs-commit at gcc dot gnu.org
2022-03-23 17:17 ` cvs-commit at gcc dot gnu.org
2022-03-24 16:39 ` jason 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).