public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c++/109122] New: std::ranges::find segfaults with gcc (trunk but not 12.2) on godbolt
@ 2023-03-14  9:10 samuel.beer at gmx dot ch
  2023-03-14 10:12 ` [Bug c++/109122] " redi at gcc dot gnu.org
                   ` (5 more replies)
  0 siblings, 6 replies; 7+ messages in thread
From: samuel.beer at gmx dot ch @ 2023-03-14  9:10 UTC (permalink / raw)
  To: gcc-bugs

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

            Bug ID: 109122
           Summary: std::ranges::find segfaults with gcc (trunk but not
                    12.2) on godbolt
           Product: gcc
           Version: 13.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: c++
          Assignee: unassigned at gcc dot gnu.org
          Reporter: samuel.beer at gmx dot ch
  Target Milestone: ---

std::ranges::find segfaults in gcc on godbolt. Happens only with gcc trunk but
not with latest 12.2...

https://godbolt.org/#z:OYLghAFBqd5QCxAYwPYBMCmBRdBLAF1QCcAaPECAMzwBtMA7AQwFtMQByARg9KtQYEAysib0QXACx8BBAKoBnTAAUAHpwAMvAFYTStJg1DIApACYAQuYukl9ZATwDKjdAGFUtAK4sGe1wAyeAyYAHI%2BAEaYxCAAHKQADqgKhE4MHt6%2BekkpjgJBIeEsUTHxdpgOaUIETMQEGT5%2BXLaY9nkM1bUEBWGR0XG2NXUNWc0KQ93BvcX9sQCUtqhexMjsHOYAzMHI3lgA1CYbbsjj%2BKiH2CYaAIKb27uYB0fEhsCYChdXt2ZbDDte%2B0ObgAbhUiMRPjc7n8Hk9jgJVgkCB8NpcoT97gDHkCTgRiMFgJDbjdmGwFAkmKs9sQjE8ACJ7U4gEAvIzvQ5WKE3cbELwOPaMRwEACeXxMAHZOdc9jKBYJCMKIMECHsGMQ5l9ZVq9iBZWqAPoSiyq4gHcV0zWyo0Si1c6WypheIh7N4EfVqiBzPYAWgue2VZuNxEwBGWDBlBo5ZttxPtMoDkY2UptHLFNy1AHoM/6GLQpns0AxxphVAlTY7nTz9WXMDRVJ6fX6mSAeQT9cC8JgAO6B6khsMHMxmYNiRxscxmKMppNp2NfAMsJjBT1iyWWmWF8aMgjoZmghwkIGChV%2B/f03vNMykDbT5Pph1O1D%2BlWHBk00AgGgMdAQfekPZXoOABsx4isyrruuqqb3jKWZ7BWT6EOe77Ml%2B6D6ngVC/hU/4mAArFYeF0kqggChqkp9qGNICvSr4AVO5q4WYIHymBIAQWqGozjB/pUAWAjFqWpoQM2CisJg%2BpMCibhYDsIoJJgSoEAs267iA%2B7gkerGiqizKbm6hDREwmmol61o8VqZbKlhE4eEWKqGS84J7F2UkFggySMGAYD4W4DATlxUpajaAq0EovH8fZJZlnsIk7syYlsJJ0mybQ8mKYQKnNhph5HKBOnYMyjnGbl2BmWuFmylZgg2UOoQkIutDPkZzmuQo7meQw3m%2Bf5Q6Beu0YDZhsVId1GwMvuAB0rieuVQXajK1UELVZj8F4357GerSYGwpHmHh6A9RO/6EL6qIGv1PEplC5ocAstCcHhvB%2BBwWikKgnBuNY1iMksKzYj8PCkAQmh3QsADWIB4Ro%2BicJIz2g%2B9nC8AoIAwyDr13aQcCwDAiAoKgLAJHQ0TkJQaBEyTMTAAozAJAoHkEKQWAdqsABqnZdgA8gpL1AzQaXRKjEARIjETBLUwqcED4vMMQwpcxE2hgtLvAU7tBBc7mUuY8zO2vOIuv4MGlSgqjuslhUTprG9yqtIjeYRC88seFgiN4ngLCqwsVAGDTHPdjzjCqzIggiGI7BSKH8hKGoiO6M0BhGCg32WPoeARKjkALKgSJpOb3qnK%2BpiWNYZgaD6ADqYhNd6XPtd6SIICO6Ao9tlTOBArgjE0pCBFMRQlNkySpAIPfD7kaQ9IP/RjO37SdMMniNHo5Qdx0EzT30MRjBM4%2B710W8zDvCwKH9qwSPdj0I7rH0cHsqixEB3pAZILrIMgsV4ut4NehAuCEBIIODYXA5i8AxloOYEMoYwwehweGpAvbQ1IC9N6d8UZo2BqDBYON8ZLAIAkJ0ZMIAU2JvQYgoRxKcEfs/V%2B79P5cDMJNMwvBMD4HBHgXczR%2BBh1EOIKOPCY4qHULrBOpAuwvASN7WGHAnooMRnfLmTpCEqlQHxGhL837AA/l/XkDBf6xQ8JTchwDQHgOwQsBAmAmBYBiJ6GRCCkEw1QbwdBthMEQLBqQSGyC4EbBvmg5GWDMZQJkSw%2BRt8gmeNCaCYgKRnCSCAA%3D%3D%3D

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

* [Bug c++/109122] std::ranges::find segfaults with gcc (trunk but not 12.2) on godbolt
  2023-03-14  9:10 [Bug c++/109122] New: std::ranges::find segfaults with gcc (trunk but not 12.2) on godbolt samuel.beer at gmx dot ch
@ 2023-03-14 10:12 ` redi at gcc dot gnu.org
  2023-03-14 10:15 ` redi at gcc dot gnu.org
                   ` (4 subsequent siblings)
  5 siblings, 0 replies; 7+ messages in thread
From: redi at gcc dot gnu.org @ 2023-03-14 10:12 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #1 from Jonathan Wakely <redi at gcc dot gnu.org> ---
As requested when creating a bug, please read https://gcc.gnu.org/bugs/ which
says to provide the testcase, not a URL to somewhere else.

#include <cstdio>
#include <ranges>
#include <vector>
#include <concepts>
#include <cstring>

namespace rng = std::ranges;

struct entity
{
    entity(int nr)
        :   nr_{ nr }
    {}

    auto get_nr() -> int { return  nr_; }

    int nr_;
};

    // inline constexpr auto str_prefix() -> std::string_view { return
"realtime"; };



int main()
{
    const std::vector<entity> vec = { 1,2,3};

    auto it = rng::find(vec, 2, &entity::get_nr);
    // auto it = rng::find_if(vec, [](int e){ return e == 2; },
&entity::get_nr);
    if constexpr (std::same_as<decltype(it),
std::vector<entity>::const_iterator>) {
        printf("Const iterator was chosen!\n");
    } else if constexpr (std::same_as<decltype(it),
std::vector<entity>::iterator>) {
        printf("Normal iterator was chosen!\n");
    }
    if (it != vec.end()) {
        printf("found vec element %d\n", it->nr_);
    }
}


109122.cc: In function 'int main()':
109122.cc:28:24: error: no match for call to '(const std::ranges::__find_fn)
(const std::vector<entity>&, int, int (entity::*)())'
   28 |     auto it = rng::find(vec, 2, &entity::get_nr);
      |               ~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~
In file included from /home/jwakely/gcc/13/include/c++/13.0.1/tuple:44,
                 from
/home/jwakely/gcc/13/include/c++/13.0.1/bits/uses_allocator_args.h:38,
                 from
/home/jwakely/gcc/13/include/c++/13.0.1/bits/memory_resource.h:41,
                 from /home/jwakely/gcc/13/include/c++/13.0.1/string:58,
                 from
/home/jwakely/gcc/13/include/c++/13.0.1/bits/locale_classes.h:40,
                 from
/home/jwakely/gcc/13/include/c++/13.0.1/bits/ios_base.h:41,
                 from /home/jwakely/gcc/13/include/c++/13.0.1/streambuf:43,
                 from
/home/jwakely/gcc/13/include/c++/13.0.1/bits/streambuf_iterator.h:35,
                 from /home/jwakely/gcc/13/include/c++/13.0.1/iterator:66,
                 from /home/jwakely/gcc/13/include/c++/13.0.1/ranges:43,
                 from 109122.cc:2:
/home/jwakely/gcc/13/include/c++/13.0.1/bits/ranges_util.h:445:7: note:
candidate: 'template<class _Iter, class _Sent, class _Tp, class _Proj> 
requires (input_iterator<_Iter>) && (sentinel_for<_Sent, _Iter>) &&
(indirect_binary_predicate<std::ranges::equal_to, std::projected<_I1, _P1>,
const _Tp*>) constexpr _Iter std::ranges::__find_fn::operator()(_Iter, _Sent,
const _Tp&, _Proj) const'
  445 |       operator()(_Iter __first, _Sent __last,
      |       ^~~~~~~~
/home/jwakely/gcc/13/include/c++/13.0.1/bits/ranges_util.h:445:7: note:  
template argument deduction/substitution failed:
/home/jwakely/gcc/13/include/c++/13.0.1/bits/ranges_util.h:445:7: note:
constraints not satisfied
In file included from
/home/jwakely/gcc/13/include/c++/13.0.1/bits/stl_iterator_base_types.h:71,
                 from /home/jwakely/gcc/13/include/c++/13.0.1/iterator:61:
/home/jwakely/gcc/13/include/c++/13.0.1/bits/iterator_concepts.h: In
substitution of 'template<class _Iter, class _Sent, class _Tp, class _Proj> 
requires (input_iterator<_Iter>) && (sentinel_for<_Sent, _Iter>) &&
(indirect_binary_predicate<std::ranges::equal_to, std::projected<_I1, _P1>,
const _Tp*>) constexpr _Iter std::ranges::__find_fn::operator()(_Iter, _Sent,
const _Tp&, _Proj) const [with _Iter = std::vector<entity>; _Sent = int; _Tp =
int (entity::*)(); _Proj = std::identity]':
109122.cc:28:24:   required from here
/home/jwakely/gcc/13/include/c++/13.0.1/bits/iterator_concepts.h:634:13:  
required for the satisfaction of 'input_or_output_iterator<_Iter>' [with _Iter
= std::vector<entity, std::allocator<entity> >]
/home/jwakely/gcc/13/include/c++/13.0.1/bits/iterator_concepts.h:656:13:  
required for the satisfaction of 'input_iterator<_Iter>' [with _Iter =
std::vector<entity, std::allocator<entity> >]
/home/jwakely/gcc/13/include/c++/13.0.1/bits/iterator_concepts.h:635:9:   in
requirements with '_Iter __i' [with _Iter = std::vector<entity,
std::allocator<entity> >]
/home/jwakely/gcc/13/include/c++/13.0.1/bits/iterator_concepts.h:635:33: note:
the required expression '* __i' is invalid
  635 |       = requires(_Iter __i) { { *__i } -> __detail::__can_reference; }
      |                                 ^~~~
cc1plus: note: set '-fconcepts-diagnostics-depth=' to at least 2 for more
detail
/home/jwakely/gcc/13/include/c++/13.0.1/bits/ranges_util.h:459:7: note:
candidate: 'template<class _Range, class _Tp, class _Proj>  requires
(input_range<_Range>) && (indirect_binary_predicate<std::ranges::equal_to,
std::projected<decltype(std::ranges::__cust_access::__begin((declval<_Container&>)())),
_Proj>, const _Tp*>) constexpr std::ranges::borrowed_iterator_t<_Range>
std::ranges::__find_fn::operator()(_Range&&, const _Tp&, _Proj) const'
  459 |       operator()(_Range&& __r, const _Tp& __value, _Proj __proj = {})
const
      |       ^~~~~~~~
/home/jwakely/gcc/13/include/c++/13.0.1/bits/ranges_util.h:459:7: note:  
template argument deduction/substitution failed:
/home/jwakely/gcc/13/include/c++/13.0.1/bits/ranges_util.h:459:7: note:
constraints not satisfied
109122.cc: In substitution of 'template<class _Range, class _Tp, class _Proj> 
requires (input_range<_Range>) &&
(indirect_binary_predicate<std::ranges::equal_to,
std::projected<decltype(std::ranges::__cust_access::__begin((declval<_Container&>)())),
_Proj>, const _Tp*>) constexpr std::ranges::borrowed_iterator_t<_Range>
std::ranges::__find_fn::operator()(_Range&&, const _Tp&, _Proj) const [with
_Range = const std::vector<entity>&; _Tp = int; _Proj = int (entity::*)()]':
109122.cc:28:24:   required from here
/home/jwakely/gcc/13/include/c++/13.0.1/bits/iterator_concepts.h:533:13:  
required for the satisfaction of '__indirectly_readable_impl<typename
std::remove_cvref<_Tp>::type>' [with _In =
std::projected<decltype(std::ranges::__cust_access::__begin((declval<_Container&>)())),
_Proj>]
/home/jwakely/gcc/13/include/c++/13.0.1/bits/iterator_concepts.h:553:13:  
required for the satisfaction of 'indirectly_readable<_I1>' [with _I1 =
std::projected<decltype(std::ranges::__cust_access::__begin((declval<_Container&>)())),
_Proj>]
/home/jwakely/gcc/13/include/c++/13.0.1/bits/iterator_concepts.h:736:13:  
required for the satisfaction of
'indirect_binary_predicate<std::ranges::equal_to, std::projected<decltype
(std::ranges::__cust_access::__begin(declval<_Container&>())), _Proj>, const
_Tp*>' [with _Range = const std::vector<entity, std::allocator<entity> >&;
_Proj = int (entity::*)(); _Tp = int]
109122.cc:28:24: error: template constraint failure for 'template<class _Iter,
class _Proj>  requires (indirectly_readable<_Iter>) &&
(indirectly_regular_unary_invocable<_Proj, _Iter>) struct std::projected'
   28 |     auto it = rng::find(vec, 2, &entity::get_nr);
      |               ~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~
109122.cc:28:24: note: constraints not satisfied
'
g++: internal compiler error: Segmentation fault signal terminated program
cc1plus
Please submit a full bug report, with preprocessed source (by using
-freport-bug).
See <https://gcc.gnu.org/bugs/> for instructions.


It segfaults with GCC 12 too, but only for --enable-checking builds.

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

* [Bug c++/109122] std::ranges::find segfaults with gcc (trunk but not 12.2) on godbolt
  2023-03-14  9:10 [Bug c++/109122] New: std::ranges::find segfaults with gcc (trunk but not 12.2) on godbolt samuel.beer at gmx dot ch
  2023-03-14 10:12 ` [Bug c++/109122] " redi at gcc dot gnu.org
@ 2023-03-14 10:15 ` redi at gcc dot gnu.org
  2023-03-14 14:33 ` mpolacek at gcc dot gnu.org
                   ` (3 subsequent siblings)
  5 siblings, 0 replies; 7+ messages in thread
From: redi at gcc dot gnu.org @ 2023-03-14 10:15 UTC (permalink / raw)
  To: gcc-bugs

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

Jonathan Wakely <redi at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |NEW
   Last reconfirmed|                            |2023-03-14
     Ever confirmed|0                           |1

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

* [Bug c++/109122] std::ranges::find segfaults with gcc (trunk but not 12.2) on godbolt
  2023-03-14  9:10 [Bug c++/109122] New: std::ranges::find segfaults with gcc (trunk but not 12.2) on godbolt samuel.beer at gmx dot ch
  2023-03-14 10:12 ` [Bug c++/109122] " redi at gcc dot gnu.org
  2023-03-14 10:15 ` redi at gcc dot gnu.org
@ 2023-03-14 14:33 ` mpolacek at gcc dot gnu.org
  2023-03-14 14:42 ` mpolacek at gcc dot gnu.org
                   ` (2 subsequent siblings)
  5 siblings, 0 replies; 7+ messages in thread
From: mpolacek at gcc dot gnu.org @ 2023-03-14 14:33 UTC (permalink / raw)
  To: gcc-bugs

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

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

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

--- Comment #2 from Marek Polacek <mpolacek at gcc dot gnu.org> ---
Backtrace:

#0  0x0000000000d482c8 in pp_cxx_unqualified_id (pp=0x40326a0
<actual_pretty_printer>, t=<tree 0x0>)
    at /home/mpolacek/src/gcc/gcc/cp/cxx-pretty-print.cc:129
#1  0x0000000000d48574 in pp_cxx_unqualified_id (pp=0x40326a0
<actual_pretty_printer>, 
    t=<record_type 0x7fffe76112a0>) at
/home/mpolacek/src/gcc/gcc/cp/cxx-pretty-print.cc:174
#2  0x0000000000d494ac in pp_cxx_qualified_id (pp=0x40326a0
<actual_pretty_printer>, 
    t=<record_type 0x7fffe76112a0>) at
/home/mpolacek/src/gcc/gcc/cp/cxx-pretty-print.cc:306
#3  0x0000000000d4c0ba in cxx_pretty_printer::simple_type_specifier
(this=0x40326a0 <actual_pretty_printer>, 
    t=<record_type 0x7fffe76112a0>) at
/home/mpolacek/src/gcc/gcc/cp/cxx-pretty-print.cc:1359
#4  0x0000000001153eb8 in pp_c_specifier_qualifier_list (pp=0x40326a0
<actual_pretty_printer>, 
    t=<record_type 0x7fffe76112a0>) at
/home/mpolacek/src/gcc/gcc/c-family/c-pretty-print.cc:514
#5  0x0000000001153c48 in pp_c_specifier_qualifier_list (pp=0x40326a0
<actual_pretty_printer>, 
    t=<reference_type 0x7fffe7710f18>) at
/home/mpolacek/src/gcc/gcc/c-family/c-pretty-print.cc:463
#6  0x000000000115496d in c_pretty_printer::type_id (this=0x40326a0
<actual_pretty_printer>, 
    t=<reference_type 0x7fffe7710f18>) at
/home/mpolacek/src/gcc/gcc/c-family/c-pretty-print.cc:712
#7  0x0000000000d4e262 in cxx_pretty_printer::type_id (this=0x40326a0
<actual_pretty_printer>, 
    t=<reference_type 0x7fffe7710f18>) at
/home/mpolacek/src/gcc/gcc/cp/cxx-pretty-print.cc:1914
#8  0x0000000000d51f52 in pp_cxx_parameter_mapping (pp=0x40326a0
<actual_pretty_printer>, 
    map=<tree_list 0x7fffe73ce668>) at
/home/mpolacek/src/gcc/gcc/cp/cxx-pretty-print.cc:2838
#9  0x0000000000d52109 in pp_cxx_atomic_constraint (pp=0x40326a0
<actual_pretty_printer>, 
    t=<atomic_constr 0x7fffe73cf4c0>) at
/home/mpolacek/src/gcc/gcc/cp/cxx-pretty-print.cc:2858
#10 0x0000000000d52291 in pp_cxx_constraint (pp=0x40326a0
<actual_pretty_printer>, 
    t=<atomic_constr 0x7fffe73cf4c0>) at
/home/mpolacek/src/gcc/gcc/cp/cxx-pretty-print.cc:2886
#11 0x0000000000de46e5 in dump_expr (pp=0x40326a0 <actual_pretty_printer>,
t=<atomic_constr 0x7fffe73cf4c0>, 
    flags=0) at /home/mpolacek/src/gcc/gcc/cp/error.cc:3080
#12 0x0000000000de518f in expr_to_string (decl=<atomic_constr 0x7fffe73cf4c0>)
    at /home/mpolacek/src/gcc/gcc/cp/error.cc:3315
#13 0x0000000000de8e2c in cp_printer (pp=0x424c120, text=0x7fffffffa0e0,
spec=0x424e071 "E", precision=0, 
    wide=false, set_locus=false, verbose=false, quoted=0x7fffffff9cdf,
buffer_ptr=0x424de80)
    at /home/mpolacek/src/gcc/gcc/cp/error.cc:4484
#14 0x0000000003228de9 in pp_format (pp=0x424c120, text=0x7fffffffa0e0)
    at /home/mpolacek/src/gcc/gcc/pretty-print.cc:1475
#15 0x00000000031fb2c6 in diagnostic_report_diagnostic (context=0x41e7980
<global_diagnostic_context>, 
    diagnostic=0x7fffffffa0e0) at /home/mpolacek/src/gcc/gcc/diagnostic.cc:1579
#16 0x00000000031fb9e2 in diagnostic_impl (richloc=0x7fffffffa1a0,
metadata=0x0, opt=-1, 
    gmsgid=0x32f0570 "the expression %qE evaluated to %<false%>",
ap=0x7fffffffa250, kind=DK_NOTE)
    at /home/mpolacek/src/gcc/gcc/diagnostic.cc:1743
#17 0x00000000031fbe6d in inform (location=19346236, 
    gmsgid=0x32f0570 "the expression %qE evaluated to %<false%>")
    at /home/mpolacek/src/gcc/gcc/diagnostic.cc:1822
#18 0x0000000000cfecca in diagnose_atomic_constraint (t=<atomic_constr
0x7fffe73cf4c0>, 
    args=<tree_vec 0x7fffe73ce6b8>, result=<integer_cst 0x7fffea227318>,
info=...)
    at /home/mpolacek/src/gcc/gcc/cp/constraint.cc:3856

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

* [Bug c++/109122] std::ranges::find segfaults with gcc (trunk but not 12.2) on godbolt
  2023-03-14  9:10 [Bug c++/109122] New: std::ranges::find segfaults with gcc (trunk but not 12.2) on godbolt samuel.beer at gmx dot ch
                   ` (2 preceding siblings ...)
  2023-03-14 14:33 ` mpolacek at gcc dot gnu.org
@ 2023-03-14 14:42 ` mpolacek at gcc dot gnu.org
  2023-11-10 19:45 ` pinskia at gcc dot gnu.org
  2023-11-10 21:22 ` ppalka at gcc dot gnu.org
  5 siblings, 0 replies; 7+ messages in thread
From: mpolacek at gcc dot gnu.org @ 2023-03-14 14:42 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #3 from Marek Polacek <mpolacek at gcc dot gnu.org> ---
Ah, looks like we're trying to print a name of a TYPE_PTRMEMFUNC_P, but it
doesn't have one; build_ptrmemfunc_type has:

11025   /* Zap out the name so that the back end will give us the debugging
11026      information for this anonymous RECORD_TYPE.  */
11027   TYPE_NAME (t) = NULL_TREE;

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

* [Bug c++/109122] std::ranges::find segfaults with gcc (trunk but not 12.2) on godbolt
  2023-03-14  9:10 [Bug c++/109122] New: std::ranges::find segfaults with gcc (trunk but not 12.2) on godbolt samuel.beer at gmx dot ch
                   ` (3 preceding siblings ...)
  2023-03-14 14:42 ` mpolacek at gcc dot gnu.org
@ 2023-11-10 19:45 ` pinskia at gcc dot gnu.org
  2023-11-10 21:22 ` ppalka at gcc dot gnu.org
  5 siblings, 0 replies; 7+ messages in thread
From: pinskia at gcc dot gnu.org @ 2023-11-10 19:45 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #4 from Andrew Pinski <pinskia at gcc dot gnu.org> ---
Created attachment 56557
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=56557&action=edit
reduction but not best though

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

* [Bug c++/109122] std::ranges::find segfaults with gcc (trunk but not 12.2) on godbolt
  2023-03-14  9:10 [Bug c++/109122] New: std::ranges::find segfaults with gcc (trunk but not 12.2) on godbolt samuel.beer at gmx dot ch
                   ` (4 preceding siblings ...)
  2023-11-10 19:45 ` pinskia at gcc dot gnu.org
@ 2023-11-10 21:22 ` ppalka at gcc dot gnu.org
  5 siblings, 0 replies; 7+ messages in thread
From: ppalka at gcc dot gnu.org @ 2023-11-10 21:22 UTC (permalink / raw)
  To: gcc-bugs

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

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

           What    |Removed                     |Added
----------------------------------------------------------------------------
           Keywords|needs-reduction             |
                 CC|                            |ppalka at gcc dot gnu.org

--- Comment #5 from Patrick Palka <ppalka at gcc dot gnu.org> ---
The problem seems to be with pretty printing a reference/pointer to a pointer
to member function type:

template<class T, class F>
concept C = requires (T t, F f) { (t.*f)(); };

struct A;

static_assert(C<A, void (A::*&)(int)>);

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

end of thread, other threads:[~2023-11-10 21:22 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-03-14  9:10 [Bug c++/109122] New: std::ranges::find segfaults with gcc (trunk but not 12.2) on godbolt samuel.beer at gmx dot ch
2023-03-14 10:12 ` [Bug c++/109122] " redi at gcc dot gnu.org
2023-03-14 10:15 ` redi at gcc dot gnu.org
2023-03-14 14:33 ` mpolacek at gcc dot gnu.org
2023-03-14 14:42 ` mpolacek at gcc dot gnu.org
2023-11-10 19:45 ` pinskia at gcc dot gnu.org
2023-11-10 21:22 ` ppalka 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).