public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c++/109321] New: [13 Regression] ICE in iterative_hash_template_arg, at cp/pt.cc:1727
@ 2023-03-28 18:55 gscfq@t-online.de
  2023-03-28 19:07 ` [Bug c++/109321] " mpolacek at gcc dot gnu.org
                   ` (3 more replies)
  0 siblings, 4 replies; 5+ messages in thread
From: gscfq@t-online.de @ 2023-03-28 18:55 UTC (permalink / raw)
  To: gcc-bugs

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

            Bug ID: 109321
           Summary: [13 Regression] ICE in iterative_hash_template_arg, at
                    cp/pt.cc:1727
           Product: gcc
           Version: 13.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: c++
          Assignee: unassigned at gcc dot gnu.org
          Reporter: gscfq@t-online.de
  Target Milestone: ---

Started between 20230226 and 20230312, with -std=c++20 or -std=c++23 :


$ cat z1.cc
struct A;
template<class C> struct B;
template<class, class C=A> using D = B<C>;
void f () { D() = 0; }


$ g++-13-20230326 -c z1.cc -std=c++23
z1.cc: In substitution of 'template<class C> B()-> B<C> requires 
__is_deducible (D, B<C>) [with C = A]':
z1.cc:4:15:   required from here
z1.cc:4:15: internal compiler error: Segmentation fault
    4 | void f () { D() = 0; }
      |               ^
0xe24a1f crash_signal
        ../../gcc/toplev.cc:314
0x88209c iterative_hash_template_arg(tree_node*, unsigned int)
        ../../gcc/cp/pt.cc:1727
0x762f71 sat_hasher::hash(sat_entry*)
        ../../gcc/cp/constraint.cc:2572
0x762f71 hash_table<sat_hasher, false, xcallocator>::find_slot(sat_entry*
const&, insert_option)
        ../../gcc/hash-table.h:435
0x762f71 satisfaction_cache::satisfaction_cache(tree_node*, tree_node*,
sat_info)
        ../../gcc/cp/constraint.cc:2668
0x765a71 satisfy_atom
        ../../gcc/cp/constraint.cc:2998
0x765a71 satisfy_constraint_r
        ../../gcc/cp/constraint.cc:3106
0x7665f3 satisfy_normalized_constraints
        ../../gcc/cp/constraint.cc:3131
0x7641da satisfy_declaration_constraints
        ../../gcc/cp/constraint.cc:3352
0x7641da constraint_satisfaction_value
        ../../gcc/cp/constraint.cc:3373
0x76666a constraints_satisfied_p(tree_node*, tree_node*)
        ../../gcc/cp/constraint.cc:3410
0x8afef5 fn_type_unification(tree_node*, tree_node*, tree_node*, tree_node*
const*, unsigned int, tree_node*, unification_kind_t, int, conversion**, bool,
bool)
        ../../gcc/cp/pt.cc:22534
0x7251cb add_template_candidate_real
        ../../gcc/cp/call.cc:3594
0x725e83 add_template_candidate
        ../../gcc/cp/call.cc:3688
0x725e83 add_candidates
        ../../gcc/cp/call.cc:6596
0x72d101 add_candidates
        ../../gcc/cp/call.cc:4911
0x72d101 perform_overload_resolution
        ../../gcc/cp/call.cc:4911
0x72d4e9 perform_dguide_overload_resolution(tree_node*, vec<tree_node*, va_gc,
vl_embed> const*, int)
        ../../gcc/cp/call.cc:4976
0x88e581 do_class_deduction
        ../../gcc/cp/pt.cc:30590
0x88e581 do_auto_deduction(tree_node*, tree_node*, tree_node*, int,
auto_deduction_context, tree_node*, int)
        ../../gcc/cp/pt.cc:30715

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

* [Bug c++/109321] [13 Regression] ICE in iterative_hash_template_arg, at cp/pt.cc:1727
  2023-03-28 18:55 [Bug c++/109321] New: [13 Regression] ICE in iterative_hash_template_arg, at cp/pt.cc:1727 gscfq@t-online.de
@ 2023-03-28 19:07 ` mpolacek at gcc dot gnu.org
  2023-03-28 21:08 ` jason at gcc dot gnu.org
                   ` (2 subsequent siblings)
  3 siblings, 0 replies; 5+ messages in thread
From: mpolacek at gcc dot gnu.org @ 2023-03-28 19:07 UTC (permalink / raw)
  To: gcc-bugs

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

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

           What    |Removed                     |Added
----------------------------------------------------------------------------
   Target Milestone|---                         |13.0
             Status|UNCONFIRMED                 |NEW
   Last reconfirmed|                            |2023-03-28
     Ever confirmed|0                           |1
                 CC|                            |jason at gcc dot gnu.org,
                   |                            |mpolacek at gcc dot gnu.org

--- Comment #1 from Marek Polacek <mpolacek at gcc dot gnu.org> ---
Started with r13-6555-g9e6170098d5e77:

commit 9e6170098d5e7756e85e880f8f4cb18e885a64fd
Author: Jason Merrill <jason@redhat.com>
Date:   Wed Feb 8 22:06:22 2023 -0800

    c++: fix alias CTAD [PR105841]

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

* [Bug c++/109321] [13 Regression] ICE in iterative_hash_template_arg, at cp/pt.cc:1727
  2023-03-28 18:55 [Bug c++/109321] New: [13 Regression] ICE in iterative_hash_template_arg, at cp/pt.cc:1727 gscfq@t-online.de
  2023-03-28 19:07 ` [Bug c++/109321] " mpolacek at gcc dot gnu.org
@ 2023-03-28 21:08 ` jason at gcc dot gnu.org
  2023-03-29  2:24 ` cvs-commit at gcc dot gnu.org
  2023-03-29  2:24 ` jason at gcc dot gnu.org
  3 siblings, 0 replies; 5+ messages in thread
From: jason at gcc dot gnu.org @ 2023-03-28 21:08 UTC (permalink / raw)
  To: gcc-bugs

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

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

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

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

* [Bug c++/109321] [13 Regression] ICE in iterative_hash_template_arg, at cp/pt.cc:1727
  2023-03-28 18:55 [Bug c++/109321] New: [13 Regression] ICE in iterative_hash_template_arg, at cp/pt.cc:1727 gscfq@t-online.de
  2023-03-28 19:07 ` [Bug c++/109321] " mpolacek at gcc dot gnu.org
  2023-03-28 21:08 ` jason at gcc dot gnu.org
@ 2023-03-29  2:24 ` cvs-commit at gcc dot gnu.org
  2023-03-29  2:24 ` jason at gcc dot gnu.org
  3 siblings, 0 replies; 5+ messages in thread
From: cvs-commit at gcc dot gnu.org @ 2023-03-29  2:24 UTC (permalink / raw)
  To: gcc-bugs

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

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

https://gcc.gnu.org/g:91293ffb6af18705ab7857dc47656bdd74a9ce31

commit r13-6922-g91293ffb6af18705ab7857dc47656bdd74a9ce31
Author: Jason Merrill <jason@redhat.com>
Date:   Tue Mar 28 17:42:23 2023 -0400

    c++: alias ctad refinements [PR109321]

    The two hunks fix missing handling demonstrated by the two testcases:
first,
    if we omit one alias template parm but include another, we need to rewrite
    the deduced template args to reflect the new position of the included parm.
    Second, if we can't deduce any template args for a parameter pack, it is
    deduced to an empty pack.

            PR c++/109321
            PR c++/109320

    gcc/cp/ChangeLog:

            * pt.cc (alias_ctad_tweaks): Rewrite deduced args.
            (type_targs_deducible_from): Handle null pack deduction.

    gcc/testsuite/ChangeLog:

            * g++.dg/cpp2a/class-deduction-alias16.C: New test.
            * g++.dg/cpp2a/class-deduction-alias17.C: New test.

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

* [Bug c++/109321] [13 Regression] ICE in iterative_hash_template_arg, at cp/pt.cc:1727
  2023-03-28 18:55 [Bug c++/109321] New: [13 Regression] ICE in iterative_hash_template_arg, at cp/pt.cc:1727 gscfq@t-online.de
                   ` (2 preceding siblings ...)
  2023-03-29  2:24 ` cvs-commit at gcc dot gnu.org
@ 2023-03-29  2:24 ` jason at gcc dot gnu.org
  3 siblings, 0 replies; 5+ messages in thread
From: jason at gcc dot gnu.org @ 2023-03-29  2:24 UTC (permalink / raw)
  To: gcc-bugs

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

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

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

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

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

end of thread, other threads:[~2023-03-29  2:24 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-03-28 18:55 [Bug c++/109321] New: [13 Regression] ICE in iterative_hash_template_arg, at cp/pt.cc:1727 gscfq@t-online.de
2023-03-28 19:07 ` [Bug c++/109321] " mpolacek at gcc dot gnu.org
2023-03-28 21:08 ` jason at gcc dot gnu.org
2023-03-29  2:24 ` cvs-commit at gcc dot gnu.org
2023-03-29  2:24 ` 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).