public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c++/98659] New: [11 Regression] ICE tree check: expected tree that contains ‘decl common’ structure, have ‘error_mark’ in maybe_instantiate_noexcept, at cp/pt.c:25445 since r11-6476-gaf362af18f405c34
@ 2021-01-13 15:19 marxin at gcc dot gnu.org
  2021-01-13 15:19 ` [Bug c++/98659] " marxin at gcc dot gnu.org
                   ` (6 more replies)
  0 siblings, 7 replies; 8+ messages in thread
From: marxin at gcc dot gnu.org @ 2021-01-13 15:19 UTC (permalink / raw)
  To: gcc-bugs

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

            Bug ID: 98659
           Summary: [11 Regression] ICE tree check: expected tree that
                    contains ‘decl common’ structure, have ‘error_mark’ in
                    maybe_instantiate_noexcept, at cp/pt.c:25445 since
                    r11-6476-gaf362af18f405c34
           Product: gcc
           Version: 11.0
            Status: UNCONFIRMED
          Keywords: ice-on-valid-code
          Severity: normal
          Priority: P3
         Component: c++
          Assignee: unassigned at gcc dot gnu.org
          Reporter: marxin at gcc dot gnu.org
                CC: mpolacek at gcc dot gnu.org
  Target Milestone: ---

The following is reduced from mkvtoolnix package:

$ cat reader.ii
template <bool> struct enable_if;
class function {
public:
  template <typename _Functor> void operator=(_Functor);
};
class map {
public:
  function operator[](int);
};
enum { avc_es };
template <typename> void do_probe();
template <typename Treader>
typename enable_if<Treader ::value>::type do_probe();
void prober_for_type() {
  map type_probe_map;
  type_probe_map[avc_es] = do_probe<int>;
}

$ g++ reader.ii -c
reader.ii: In substitution of ‘template<class _Functor> void
function::operator=(_Functor) [with _Functor = <missing>]’:
reader.ii:16:28:   required from here
reader.ii:16:28: internal compiler error: tree check: expected tree that
contains ‘decl common’ structure, have ‘error_mark’ in
maybe_instantiate_noexcept, at cp/pt.c:25462
   16 |   type_probe_map[avc_es] = do_probe<int>;
      |                            ^~~~~~~~~~~~~
0x8a7470 tree_contains_struct_check_failed(tree_node const*,
tree_node_structure_enum, char const*, int, char const*)
        /home/marxin/Programming/gcc/gcc/tree.c:9984
0x71256f contains_struct_check(tree_node*, tree_node_structure_enum, char
const*, int, char const*)
        /home/marxin/Programming/gcc/gcc/tree.h:3452
0x71256f maybe_instantiate_noexcept(tree_node*, int)
        /home/marxin/Programming/gcc/gcc/cp/pt.c:25462
0xb59cc9 resolve_overloaded_unification
        /home/marxin/Programming/gcc/gcc/cp/pt.c:22386
0xb59cc9 unify_one_argument
        /home/marxin/Programming/gcc/gcc/cp/pt.c:21932
0xb72005 type_unification_real
        /home/marxin/Programming/gcc/gcc/cp/pt.c:22076
0xb81de9 fn_type_unification(tree_node*, tree_node*, tree_node*, tree_node*
const*, unsigned int, tree_node*, unification_kind_t, int, conversion**, bool,
bool)
        /home/marxin/Programming/gcc/gcc/cp/pt.c:21445
0x986a63 add_template_candidate_real
        /home/marxin/Programming/gcc/gcc/cp/call.c:3441
0x98745c add_template_candidate
        /home/marxin/Programming/gcc/gcc/cp/call.c:3526
0x98745c add_candidates
        /home/marxin/Programming/gcc/gcc/cp/call.c:5955
0x989f99 add_candidates
        /home/marxin/Programming/gcc/gcc/cp/call.c:5870
0x989f99 add_operator_candidates
        /home/marxin/Programming/gcc/gcc/cp/call.c:6074
0x9915ef build_new_op_1
        /home/marxin/Programming/gcc/gcc/cp/call.c:6282
0x992351 build_new_op(op_location_t const&, tree_code, int, tree_node*,
tree_node*, tree_node*, tree_node**, int)
        /home/marxin/Programming/gcc/gcc/cp/call.c:6670
0xbeff5c cp_build_modify_expr(unsigned int, tree_node*, tree_code, tree_node*,
int)
        /home/marxin/Programming/gcc/gcc/cp/typeck.c:8695
0xbf08b8 build_x_modify_expr(unsigned int, tree_node*, tree_code, tree_node*,
int)
        /home/marxin/Programming/gcc/gcc/cp/typeck.c:8957
0xaed67e cp_parser_assignment_expression
        /home/marxin/Programming/gcc/gcc/cp/parser.c:10172
0xaef022 cp_parser_expression
        /home/marxin/Programming/gcc/gcc/cp/parser.c:10298
0xaf2648 cp_parser_expression_statement
        /home/marxin/Programming/gcc/gcc/cp/parser.c:11965
0xafe880 cp_parser_statement
        /home/marxin/Programming/gcc/gcc/cp/parser.c:11761
Please submit a full bug report,
with preprocessed source if appropriate.
Please include the complete backtrace with any bug report.
See <https://gcc.gnu.org/bugs/> for instructions.

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

* [Bug c++/98659] [11 Regression] ICE tree check: expected tree that contains ‘decl common’ structure, have ‘error_mark’ in maybe_instantiate_noexcept, at cp/pt.c:25445 since r11-6476-gaf362af18f405c34
  2021-01-13 15:19 [Bug c++/98659] New: [11 Regression] ICE tree check: expected tree that contains ‘decl common’ structure, have ‘error_mark’ in maybe_instantiate_noexcept, at cp/pt.c:25445 since r11-6476-gaf362af18f405c34 marxin at gcc dot gnu.org
@ 2021-01-13 15:19 ` marxin at gcc dot gnu.org
  2021-01-13 15:22 ` mpolacek at gcc dot gnu.org
                   ` (5 subsequent siblings)
  6 siblings, 0 replies; 8+ messages in thread
From: marxin at gcc dot gnu.org @ 2021-01-13 15:19 UTC (permalink / raw)
  To: gcc-bugs

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

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

           What    |Removed                     |Added
----------------------------------------------------------------------------
           Priority|P3                          |P1
   Target Milestone|---                         |11.0
      Known to work|                            |10.2.0
   Last reconfirmed|                            |2021-01-13
     Ever confirmed|0                           |1
      Known to fail|                            |11.0
             Status|UNCONFIRMED                 |NEW

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

* [Bug c++/98659] [11 Regression] ICE tree check: expected tree that contains ‘decl common’ structure, have ‘error_mark’ in maybe_instantiate_noexcept, at cp/pt.c:25445 since r11-6476-gaf362af18f405c34
  2021-01-13 15:19 [Bug c++/98659] New: [11 Regression] ICE tree check: expected tree that contains ‘decl common’ structure, have ‘error_mark’ in maybe_instantiate_noexcept, at cp/pt.c:25445 since r11-6476-gaf362af18f405c34 marxin at gcc dot gnu.org
  2021-01-13 15:19 ` [Bug c++/98659] " marxin at gcc dot gnu.org
@ 2021-01-13 15:22 ` mpolacek at gcc dot gnu.org
  2021-01-19 14:40 ` dcb314 at hotmail dot com
                   ` (4 subsequent siblings)
  6 siblings, 0 replies; 8+ messages in thread
From: mpolacek at gcc dot gnu.org @ 2021-01-13 15:22 UTC (permalink / raw)
  To: gcc-bugs

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

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

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

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

* [Bug c++/98659] [11 Regression] ICE tree check: expected tree that contains ‘decl common’ structure, have ‘error_mark’ in maybe_instantiate_noexcept, at cp/pt.c:25445 since r11-6476-gaf362af18f405c34
  2021-01-13 15:19 [Bug c++/98659] New: [11 Regression] ICE tree check: expected tree that contains ‘decl common’ structure, have ‘error_mark’ in maybe_instantiate_noexcept, at cp/pt.c:25445 since r11-6476-gaf362af18f405c34 marxin at gcc dot gnu.org
  2021-01-13 15:19 ` [Bug c++/98659] " marxin at gcc dot gnu.org
  2021-01-13 15:22 ` mpolacek at gcc dot gnu.org
@ 2021-01-19 14:40 ` dcb314 at hotmail dot com
  2021-01-19 22:41 ` cvs-commit at gcc dot gnu.org
                   ` (3 subsequent siblings)
  6 siblings, 0 replies; 8+ messages in thread
From: dcb314 at hotmail dot com @ 2021-01-19 14:40 UTC (permalink / raw)
  To: gcc-bugs

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

David Binderman <dcb314 at hotmail dot com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |dcb314 at hotmail dot com

--- Comment #1 from David Binderman <dcb314 at hotmail dot com> ---
I see this problem when compiling package nheko.

I will try to produce another test case.

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

* [Bug c++/98659] [11 Regression] ICE tree check: expected tree that contains ‘decl common’ structure, have ‘error_mark’ in maybe_instantiate_noexcept, at cp/pt.c:25445 since r11-6476-gaf362af18f405c34
  2021-01-13 15:19 [Bug c++/98659] New: [11 Regression] ICE tree check: expected tree that contains ‘decl common’ structure, have ‘error_mark’ in maybe_instantiate_noexcept, at cp/pt.c:25445 since r11-6476-gaf362af18f405c34 marxin at gcc dot gnu.org
                   ` (2 preceding siblings ...)
  2021-01-19 14:40 ` dcb314 at hotmail dot com
@ 2021-01-19 22:41 ` cvs-commit at gcc dot gnu.org
  2021-01-19 22:42 ` mpolacek at gcc dot gnu.org
                   ` (2 subsequent siblings)
  6 siblings, 0 replies; 8+ messages in thread
From: cvs-commit at gcc dot gnu.org @ 2021-01-19 22:41 UTC (permalink / raw)
  To: gcc-bugs

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

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

https://gcc.gnu.org/g:2b27f37f90cb66e277b734c605639e2f00a2e942

commit r11-6804-g2b27f37f90cb66e277b734c605639e2f00a2e942
Author: Marek Polacek <polacek@redhat.com>
Date:   Wed Jan 13 13:12:14 2021 -0500

    c++: Crash when deducing template arguments [PR98659]

    maybe_instantiate_noexcept doesn't expect to see error_mark_node, but
    the new callsite I introduced in r11-6476 can pass error_mark_node to
    it.  So cope.

    gcc/cp/ChangeLog:

            PR c++/98659
            * pt.c (maybe_instantiate_noexcept): Return false if FN is
            error_mark_node.

    gcc/testsuite/ChangeLog:

            PR c++/98659
            * g++.dg/template/deduce8.C: New test.

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

* [Bug c++/98659] [11 Regression] ICE tree check: expected tree that contains ‘decl common’ structure, have ‘error_mark’ in maybe_instantiate_noexcept, at cp/pt.c:25445 since r11-6476-gaf362af18f405c34
  2021-01-13 15:19 [Bug c++/98659] New: [11 Regression] ICE tree check: expected tree that contains ‘decl common’ structure, have ‘error_mark’ in maybe_instantiate_noexcept, at cp/pt.c:25445 since r11-6476-gaf362af18f405c34 marxin at gcc dot gnu.org
                   ` (3 preceding siblings ...)
  2021-01-19 22:41 ` cvs-commit at gcc dot gnu.org
@ 2021-01-19 22:42 ` mpolacek at gcc dot gnu.org
  2021-01-21 23:49 ` doko at debian dot org
  2021-01-21 23:54 ` mpolacek at gcc dot gnu.org
  6 siblings, 0 replies; 8+ messages in thread
From: mpolacek at gcc dot gnu.org @ 2021-01-19 22:42 UTC (permalink / raw)
  To: gcc-bugs

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

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

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

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

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

* [Bug c++/98659] [11 Regression] ICE tree check: expected tree that contains ‘decl common’ structure, have ‘error_mark’ in maybe_instantiate_noexcept, at cp/pt.c:25445 since r11-6476-gaf362af18f405c34
  2021-01-13 15:19 [Bug c++/98659] New: [11 Regression] ICE tree check: expected tree that contains ‘decl common’ structure, have ‘error_mark’ in maybe_instantiate_noexcept, at cp/pt.c:25445 since r11-6476-gaf362af18f405c34 marxin at gcc dot gnu.org
                   ` (4 preceding siblings ...)
  2021-01-19 22:42 ` mpolacek at gcc dot gnu.org
@ 2021-01-21 23:49 ` doko at debian dot org
  2021-01-21 23:54 ` mpolacek at gcc dot gnu.org
  6 siblings, 0 replies; 8+ messages in thread
From: doko at debian dot org @ 2021-01-21 23:49 UTC (permalink / raw)
  To: gcc-bugs

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

Matthias Klose <doko at debian dot org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |doko at debian dot org

--- Comment #4 from Matthias Klose <doko at debian dot org> ---
I got reports for this issue for the gcc-10 branch as well. Please could you
consider a backport?

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

* [Bug c++/98659] [11 Regression] ICE tree check: expected tree that contains ‘decl common’ structure, have ‘error_mark’ in maybe_instantiate_noexcept, at cp/pt.c:25445 since r11-6476-gaf362af18f405c34
  2021-01-13 15:19 [Bug c++/98659] New: [11 Regression] ICE tree check: expected tree that contains ‘decl common’ structure, have ‘error_mark’ in maybe_instantiate_noexcept, at cp/pt.c:25445 since r11-6476-gaf362af18f405c34 marxin at gcc dot gnu.org
                   ` (5 preceding siblings ...)
  2021-01-21 23:49 ` doko at debian dot org
@ 2021-01-21 23:54 ` mpolacek at gcc dot gnu.org
  6 siblings, 0 replies; 8+ messages in thread
From: mpolacek at gcc dot gnu.org @ 2021-01-21 23:54 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #5 from Marek Polacek <mpolacek at gcc dot gnu.org> ---
(In reply to Matthias Klose from comment #4)
> I got reports for this issue for the gcc-10 branch as well. Please could you
> consider a backport?

That must be a different problem, perhaps 98333.

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

end of thread, other threads:[~2021-01-21 23:54 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-01-13 15:19 [Bug c++/98659] New: [11 Regression] ICE tree check: expected tree that contains ‘decl common’ structure, have ‘error_mark’ in maybe_instantiate_noexcept, at cp/pt.c:25445 since r11-6476-gaf362af18f405c34 marxin at gcc dot gnu.org
2021-01-13 15:19 ` [Bug c++/98659] " marxin at gcc dot gnu.org
2021-01-13 15:22 ` mpolacek at gcc dot gnu.org
2021-01-19 14:40 ` dcb314 at hotmail dot com
2021-01-19 22:41 ` cvs-commit at gcc dot gnu.org
2021-01-19 22:42 ` mpolacek at gcc dot gnu.org
2021-01-21 23:49 ` doko at debian dot org
2021-01-21 23:54 ` 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).