public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c++/110961] New: internal compiler error: segmentation fault
@ 2023-08-09 14:46 gnu.slighted142 at passmail dot net
  2023-08-09 14:58 ` [Bug c++/110961] " gnu.slighted142 at passmail dot net
                   ` (3 more replies)
  0 siblings, 4 replies; 5+ messages in thread
From: gnu.slighted142 at passmail dot net @ 2023-08-09 14:46 UTC (permalink / raw)
  To: gcc-bugs

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

            Bug ID: 110961
           Summary: internal compiler error: segmentation fault
           Product: gcc
           Version: 13.1.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: c++
          Assignee: unassigned at gcc dot gnu.org
          Reporter: gnu.slighted142 at passmail dot net
  Target Milestone: ---

Note that this occurs with gcc-11.4.0, gcc-12.3.0 and gcc-13.1.0, but does not
occur with clang-15 or clang-16.

The code causing this error is here:
https://github.com/heal-research/operon/blob/2419a3f09383386379607717133027b02f18942c/include/operon/interpreter/dispatch_table.hpp#L180

The code tries to retrieve the N-1 types from a template parameter pack.

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

* [Bug c++/110961] internal compiler error: segmentation fault
  2023-08-09 14:46 [Bug c++/110961] New: internal compiler error: segmentation fault gnu.slighted142 at passmail dot net
@ 2023-08-09 14:58 ` gnu.slighted142 at passmail dot net
  2023-08-09 15:05 ` mpolacek at gcc dot gnu.org
                   ` (2 subsequent siblings)
  3 siblings, 0 replies; 5+ messages in thread
From: gnu.slighted142 at passmail dot net @ 2023-08-09 14:58 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #1 from Bogdan Burlacu <gnu.slighted142 at passmail dot net> ---
Note that I couldn't make an attachment due to file size restrictions (despite
my attempts to compress the file), so I uploaded preprocessed source generated
by -freport-bug here:
https://gist.githubusercontent.com/foolnotion/ce9cf282cd398502bf84e394c0854022/raw/649658a6a3a085662cc37ad88fa2f4cab1438733/gcc-13.1.0.out

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

* [Bug c++/110961] internal compiler error: segmentation fault
  2023-08-09 14:46 [Bug c++/110961] New: internal compiler error: segmentation fault gnu.slighted142 at passmail dot net
  2023-08-09 14:58 ` [Bug c++/110961] " gnu.slighted142 at passmail dot net
@ 2023-08-09 15:05 ` mpolacek at gcc dot gnu.org
  2023-08-09 15:06 ` mpolacek at gcc dot gnu.org
  2023-11-10  7:24 ` pinskia at gcc dot gnu.org
  3 siblings, 0 replies; 5+ messages in thread
From: mpolacek at gcc dot gnu.org @ 2023-08-09 15:05 UTC (permalink / raw)
  To: gcc-bugs

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

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> ---
The ICE is the following but I see various error: template argument 2 is
invalid errors too.

/home/bogdb/src/operon-mdl-fix/include/operon/interpreter/dispatch_table.hpp:180:71:
internal compiler error: Segmentation fault
0x1a1c1fc crash_signal
        /home/mpolacek/src/gcc/gcc/toplev.cc:314
0x7fb6968e2b1f ???
       
/usr/src/debug/glibc-2.36-9.fc37.x86_64/signal/../sysdeps/unix/sysv/linux/x86_64/libc_sigaction.c:0
0xd1fcd0 tree_check(tree_node*, char const*, int, char const*, tree_code)
        /home/mpolacek/src/gcc/gcc/tree.h:3576
0x1045f31 template_parms_to_args(tree_node*)
        /home/mpolacek/src/gcc/gcc/cp/pt.cc:4917
0x107670f tsubst_template_decl
        /home/mpolacek/src/gcc/gcc/cp/pt.cc:14784
0x1096ecb tsubst_lambda_expr(tree_node*, tree_node*, int, tree_node*)
        /home/mpolacek/src/gcc/gcc/cp/pt.cc:20203
0x109eb78 tsubst_copy_and_build(tree_node*, tree_node*, int, tree_node*)
        /home/mpolacek/src/gcc/gcc/cp/pt.cc:21769
0x109af92 tsubst_copy_and_build(tree_node*, tree_node*, int, tree_node*)
        /home/mpolacek/src/gcc/gcc/cp/pt.cc:21082
0x1081785 tsubst(tree_node*, tree_node*, int, tree_node*)
        /home/mpolacek/src/gcc/gcc/cp/pt.cc:16693
0x1069f29 tsubst_template_arg(tree_node*, tree_node*, int, tree_node*)
        /home/mpolacek/src/gcc/gcc/cp/pt.cc:12622
0x106ee4c tsubst_template_args(tree_node*, tree_node*, int, tree_node*)
        /home/mpolacek/src/gcc/gcc/cp/pt.cc:13775
0x107048d tsubst_aggr_type_1
        /home/mpolacek/src/gcc/gcc/cp/pt.cc:14049
0x107030e tsubst_aggr_type
        /home/mpolacek/src/gcc/gcc/cp/pt.cc:14019
0x1080ed3 tsubst(tree_node*, tree_node*, int, tree_node*)
        /home/mpolacek/src/gcc/gcc/cp/pt.cc:16579
0x1069f29 tsubst_template_arg(tree_node*, tree_node*, int, tree_node*)
        /home/mpolacek/src/gcc/gcc/cp/pt.cc:12622
0x106ee4c tsubst_template_args(tree_node*, tree_node*, int, tree_node*)
        /home/mpolacek/src/gcc/gcc/cp/pt.cc:13775
0x107048d tsubst_aggr_type_1
        /home/mpolacek/src/gcc/gcc/cp/pt.cc:14049
0x107030e tsubst_aggr_type
        /home/mpolacek/src/gcc/gcc/cp/pt.cc:14019
0x1080ed3 tsubst(tree_node*, tree_node*, int, tree_node*)
        /home/mpolacek/src/gcc/gcc/cp/pt.cc:16579
0x1069f29 tsubst_template_arg(tree_node*, tree_node*, int, tree_node*)
        /home/mpolacek/src/gcc/gcc/cp/pt.cc:12622

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

* [Bug c++/110961] internal compiler error: segmentation fault
  2023-08-09 14:46 [Bug c++/110961] New: internal compiler error: segmentation fault gnu.slighted142 at passmail dot net
  2023-08-09 14:58 ` [Bug c++/110961] " gnu.slighted142 at passmail dot net
  2023-08-09 15:05 ` mpolacek at gcc dot gnu.org
@ 2023-08-09 15:06 ` mpolacek at gcc dot gnu.org
  2023-11-10  7:24 ` pinskia at gcc dot gnu.org
  3 siblings, 0 replies; 5+ messages in thread
From: mpolacek at gcc dot gnu.org @ 2023-08-09 15:06 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #3 from Marek Polacek <mpolacek at gcc dot gnu.org> ---
Probably a dup of bug 105667.

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

* [Bug c++/110961] internal compiler error: segmentation fault
  2023-08-09 14:46 [Bug c++/110961] New: internal compiler error: segmentation fault gnu.slighted142 at passmail dot net
                   ` (2 preceding siblings ...)
  2023-08-09 15:06 ` mpolacek at gcc dot gnu.org
@ 2023-11-10  7:24 ` pinskia at gcc dot gnu.org
  3 siblings, 0 replies; 5+ messages in thread
From: pinskia at gcc dot gnu.org @ 2023-11-10  7:24 UTC (permalink / raw)
  To: gcc-bugs

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

Andrew Pinski <pinskia at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
   Last reconfirmed|                            |2023-11-10
     Ever confirmed|0                           |1
             Status|UNCONFIRMED                 |NEW

--- Comment #4 from Andrew Pinski <pinskia at gcc dot gnu.org> ---
The smallest I could get right now:
```
namespace std {
typedef long unsigned int size_t;
template <bool _Cond, typename _Iftrue, typename _Iffalse> struct conditional
{};
template <bool _Cond, typename _Iftrue, typename _Iffalse>
using conditional_t = typename conditional<_Cond, _Iftrue, _Iffalse>::type;
template <typename _Tp>
inline constexpr size_t tuple_size_v = tuple_size<_Tp>::value;
template <typename... Ts>
 struct DispatchTable {
using Typ = std::conditional_t<true,
  decltype([]<auto... Idx>(std::index_sequence<Idx...>)
{}(std::make_index_sequence<sizeof...(Ts) - 1>{})),
  int>;
template <typename T, auto SZ = std::tuple_size_v<Typ>>
static auto constexpr TypeIndex = detail::TypeIndexImpl<T, Ts...>();
static constexpr typename Ext::value_type BatchSize = Sizes[TypeIndex<T>];

```

The above is an ICE after errors but I suspect this is the same as the other
decltype of a lambda issues too.

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

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

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-08-09 14:46 [Bug c++/110961] New: internal compiler error: segmentation fault gnu.slighted142 at passmail dot net
2023-08-09 14:58 ` [Bug c++/110961] " gnu.slighted142 at passmail dot net
2023-08-09 15:05 ` mpolacek at gcc dot gnu.org
2023-08-09 15:06 ` mpolacek at gcc dot gnu.org
2023-11-10  7:24 ` pinskia 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).