public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c++/107003] New: ICE in mangle_decl, at cp/mangle.cc:4112
@ 2022-09-21 17:38 gscfq@t-online.de
2022-09-21 17:43 ` [Bug c++/107003] " mpolacek at gcc dot gnu.org
2022-09-22 19:20 ` [Bug c++/107003] ICE in mangle_decl, at cp/mangle.cc:4112 since r6-1066-g233ce289250944dd marxin at gcc dot gnu.org
0 siblings, 2 replies; 3+ messages in thread
From: gscfq@t-online.de @ 2022-09-21 17:38 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=107003
Bug ID: 107003
Summary: ICE in mangle_decl, at cp/mangle.cc:4112
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: ---
Affects versions down to r6, at -O2+ :
$ cat z1.cc
#include <experimental/list>
namespace pmr = std::experimental::pmr;
void f ()
{
using pl = pmr::list<int>;
pl a;
return;
}
$ gcc-13-20220918 -c z1.cc -O2 -flto -fno-weak
during IPA pass: *free_lang_data
In file included from .../include/c++/13.0.0/experimental/list:38,
from z1.cc:1:
.../include/c++/13.0.0/experimental/memory_resource:520:11: internal compiler
error: in mangle_decl, at cp/mangle.cc:4112
520 | class type final : public memory_resource
| ^~~~
0x95d694 mangle_decl(tree_node*)
../../gcc/cp/mangle.cc:4111
0x1504062 decl_assembler_name(tree_node*)
../../gcc/tree.cc:741
0x1536050 assign_assembler_name_if_needed(tree_node*)
../../gcc/tree.cc:856
0x201be6d free_lang_data_in_cgraph
../../gcc/ipa-free-lang-data.cc:1064
0x201be6d free_lang_data
../../gcc/ipa-free-lang-data.cc:1109
0x201be6d execute
../../gcc/ipa-free-lang-data.cc:1176
^ permalink raw reply [flat|nested] 3+ messages in thread
* [Bug c++/107003] ICE in mangle_decl, at cp/mangle.cc:4112
2022-09-21 17:38 [Bug c++/107003] New: ICE in mangle_decl, at cp/mangle.cc:4112 gscfq@t-online.de
@ 2022-09-21 17:43 ` mpolacek at gcc dot gnu.org
2022-09-22 19:20 ` [Bug c++/107003] ICE in mangle_decl, at cp/mangle.cc:4112 since r6-1066-g233ce289250944dd marxin at gcc dot gnu.org
1 sibling, 0 replies; 3+ messages in thread
From: mpolacek at gcc dot gnu.org @ 2022-09-21 17:43 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=107003
Marek Polacek <mpolacek at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |mpolacek at gcc dot gnu.org
Status|UNCONFIRMED |NEW
Ever confirmed|0 |1
Last reconfirmed| |2022-09-21
--- Comment #1 from Marek Polacek <mpolacek at gcc dot gnu.org> ---
Confirmed. g++6 ICEs as well.
^ permalink raw reply [flat|nested] 3+ messages in thread
* [Bug c++/107003] ICE in mangle_decl, at cp/mangle.cc:4112 since r6-1066-g233ce289250944dd
2022-09-21 17:38 [Bug c++/107003] New: ICE in mangle_decl, at cp/mangle.cc:4112 gscfq@t-online.de
2022-09-21 17:43 ` [Bug c++/107003] " mpolacek at gcc dot gnu.org
@ 2022-09-22 19:20 ` marxin at gcc dot gnu.org
1 sibling, 0 replies; 3+ messages in thread
From: marxin at gcc dot gnu.org @ 2022-09-22 19:20 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=107003
Martin Liška <marxin at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Summary|ICE in mangle_decl, at |ICE in mangle_decl, at
|cp/mangle.cc:4112 |cp/mangle.cc:4112 since
| |r6-1066-g233ce289250944dd
CC| |hubicka at gcc dot gnu.org,
| |marxin at gcc dot gnu.org
--- Comment #2 from Martin Liška <marxin at gcc dot gnu.org> ---
Reduced test-case:
$ cat pr107003.ii
template < typename _Default, template < typename > class >
using __detected_or_t = _Default;
template < typename, typename > struct __replace_first_arg;
template < template < typename... > class _Template, typename _Up, typename
_Tp,
typename... _Types >
struct __replace_first_arg< _Template< _Tp, _Types... >, _Up > {
using type = _Template< _Up >;
};
template < typename _Tp > using __pointer = typename _Tp::pointer;
template < typename _Tp > struct __rebind : __replace_first_arg< _Tp, int > {};
template < typename _Alloc, typename >
using __alloc_rebind = typename __rebind< _Alloc >::type;
template < typename _Alloc > struct allocator_traits {
using pointer = __detected_or_t< typename _Alloc::value_type *, __pointer >;
template < typename _Tp > using rebind_alloc = __alloc_rebind< _Alloc, _Tp >;
static void deallocate(_Alloc __a, pointer __p, int __n) {
__a.deallocate(__p, __n);
}
};
template < typename _Alloc >
struct __alloc_traits : allocator_traits< _Alloc > {
template < typename > struct rebind {
typedef typename allocator_traits< _Alloc >::template rebind_alloc< int >
other;
};
};
template < typename _Alloc > struct _List_base {
typedef __alloc_traits< _Alloc > _Tp_alloc_traits;
typedef
typename _Tp_alloc_traits::template rebind< int >::other
_Node_alloc_type;
typedef __alloc_traits< _Node_alloc_type > _Node_alloc_traits;
struct : _Node_alloc_type {
} _M_impl;
typename _Node_alloc_traits::pointer _M_put_node___p;
_List_base() { _Node_alloc_traits::deallocate(_M_impl, _M_put_node___p, 1); }
};
namespace experimental {
inline namespace fundamentals_v2 {
void *deallocate___p;
long deallocate___bytes;
long deallocate___alignment;
struct memory_resource {
void deallocate() {
do_deallocate(deallocate___p, deallocate___bytes, deallocate___alignment);
}
virtual void do_deallocate(void *, unsigned long, unsigned long);
};
template < class > struct polymorphic_allocator {
using value_type = int;
void deallocate(int *, long) { _M_resource.deallocate(); }
memory_resource _M_resource;
};
inline void null_memory_resource() {
struct final : memory_resource {
void do_deallocate(void *, unsigned long, unsigned long) {}
};
}
template < typename _Tp >
using list = _List_base< polymorphic_allocator< _Tp > >;
} list< int > a;
}
started failing since r6-1066-g233ce289250944dd.
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2022-09-22 19:21 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-09-21 17:38 [Bug c++/107003] New: ICE in mangle_decl, at cp/mangle.cc:4112 gscfq@t-online.de
2022-09-21 17:43 ` [Bug c++/107003] " mpolacek at gcc dot gnu.org
2022-09-22 19:20 ` [Bug c++/107003] ICE in mangle_decl, at cp/mangle.cc:4112 since r6-1066-g233ce289250944dd marxin 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).