public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c++/116682] New: internal compiler error: in tsubst_expr, at cp/pt.cc:21463
@ 2024-09-11 15:08 djnz00 at gmail dot com
  2024-09-11 15:12 ` [Bug c++/116682] " djnz00 at gmail dot com
                   ` (11 more replies)
  0 siblings, 12 replies; 13+ messages in thread
From: djnz00 at gmail dot com @ 2024-09-11 15:08 UTC (permalink / raw)
  To: gcc-bugs

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

            Bug ID: 116682
           Summary: internal compiler error: in tsubst_expr, at
                    cp/pt.cc:21463
           Product: gcc
           Version: 14.2.1
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: c++
          Assignee: unassigned at gcc dot gnu.org
          Reporter: djnz00 at gmail dot com
  Target Milestone: ---

gcc bombs out on this code; clang does not

see https://github.com/djnz00/gcc-bug/tree/main

(pre-processed source code file may be too large to attach here)

] g++ -D_REENTRANT -D_GNU_SOURCE -D__x86_64__ -Wall -Wno-parentheses
-Wno-invalid-offsetof -Wno-misleading-indentation -fstrict-aliasing
-std=gnu++2b -ftemplate-backtrace-limit=0 -g -march=x86-64-v2 -fno-math-errno
-fno-trapping-math -fno-rounding-math -fno-signaling-nans -DZDEBUG
-Wno-non-template-friend -Wno-enum-compare -Wno-deprecated-enum-enum-conversion
-Wno-int-in-bool-context -Wno-unused-value -Wno-sign-compare -c gcc-bug.cc -o
gcc-bug.o
gcc-bug.cc: In instantiation of ‘Zdf::DFWriter_<Zdf::WrapType<Frame, false>,
ZmHeap__<Zdf::DFWriter_HeapID, 64, 8, false> >::write(const
O&)::<lambda(auto:131)> [with auto:131 = ZuConstant<unsigned int, 0>]’:
gcc-bug.cc:8091:44:   required from ‘struct ZuUnroll::Deduce<ZuSeq<0, 1>,
Zdf::DFWriter_<Zdf::WrapType<Frame, false>, ZmHeap__<Zdf::DFWriter_HeapID, 64,
8, false> >::write(const O&)::<lambda(auto:131)> >’
 8091 |   using R = ZuDecay<decltype(ZuDeclVal<L>()(ZuUnsigned<0>{}))>;
      |                              ~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~
gcc-bug.cc:8102:52:   required from ‘constexpr decltype(auto) ZuUnroll::all(L)
[with List = ZuSeq<0, 1>; L = Zdf::DFWriter_<Zdf::WrapType<Frame, false>,
ZmHeap__<Zdf::DFWriter_HeapID, 64, 8, false> >::write(const
O&)::<lambda(auto:131)>]’
 8102 |   return All<typename Deduce<List, L>::R, List>::fn(ZuMv(l));
      |          ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~
gcc-bug.cc:8105:25:   required from ‘constexpr decltype(auto) ZuUnroll::all(L)
[with unsigned int N = 2; L = Zdf::DFWriter_<Zdf::WrapType<Frame, false>,
ZmHeap__<Zdf::DFWriter_HeapID, 64, 8, false> >::write(const
O&)::<lambda(auto:131)>]’
 8105 |   return all<ZuMkSeq<N>>(ZuMv(l));
      |          ~~~~~~~~~~~~~~~^~~~~~~~~
gcc-bug.cc:67341:29:   required from ‘void Zdf::DFWriter_<W, Heap>::write(const
O&) [with W = Zdf::WrapType<Frame, false>; Heap =
ZmHeap__<Zdf::DFWriter_HeapID, 64, 8, false>; O = Frame]’
67341 |     ZuUnroll::all<WrRefs::N>([this, &o, &ok](auto I) {
      |     ~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~
67342 |       if (!ok) return;
      |       ~~~~~~~~~~~~~~~~       
67343 |       using Field = ZuType<I, Fields>;
      |       ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
67344 |       enum { NDP = GetNDP<Field>{} };
      |       ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
67345 |       if constexpr (Field::Code == Float)
      |       ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
67346 |         ok = ok && m_wrRefs.template p<I>()->write(Field::get(o));
      |         ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
67347 |       else if constexpr (Field::Code == Fixed)
      |       ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
67348 |         ok = ok && m_wrRefs.template
p<I>()->write(Field::get(o).adjust(NDP));
      |        
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
67349 |       else if constexpr (Field::Code == Int8 || Field::Code == UInt8 ||
      |       ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
67350 |                          Field::Code == Int16 || Field::Code == UInt16
||
      |                         
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
67351 |                          Field::Code == Int32 || Field::Code == UInt32
||
      |                         
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
67352 |                          Field::Code == Int64 || Field::Code == UInt64)
      |                          ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
67353 |         ok = ok && m_wrRefs.template p<I>()->write(Field::get(o));
      |         ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
67354 |       else if constexpr (Field::Code == Decimal)
      |       ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
67355 |         ok = ok && m_wrRefs.template
p<I>()->write(ZuFixed{Field::get(o), NDP});
      |        
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
67356 |       else if constexpr (Field::Code == Time)
      |       ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
67357 |         ok = ok &&
      |         ~~~~~~~~~~           
67358 |           m_wrRefs.template p<I>()->write(
      |           ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
67359 |             m_df->template series<I>()->nsecs(Field::get(o))
      |             ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
67360 |           );
      |           ~~                 
67361 |     });
      |     ~~                       
gcc-bug.cc:67927:15:   required from here
67927 |       w->write(frame);
      |       ~~~~~~~~^~~~~~~
gcc-bug.cc:67344:12: internal compiler error: in tsubst_expr, at cp/pt.cc:21463
67344 |       enum { NDP = GetNDP<Field>{} };
      |            ^
0x21a7bea internal_error(char const*, ...)
        ???:0
0x703e99 fancy_abort(char const*, int, char const*)
        ???:0
0x8e1dcf tsubst_template_args(tree_node*, tree_node*, int, tree_node*)
        ???:0
0x8d7e80 tsubst(tree_node*, tree_node*, int, tree_node*)
        ???:0
0x8e1dcf tsubst_template_args(tree_node*, tree_node*, int, tree_node*)
        ???:0
0x8d72c8 tsubst(tree_node*, tree_node*, int, tree_node*)
        ???:0
0x8d1578 tsubst_expr(tree_node*, tree_node*, int, tree_node*)
        ???:0
0x8e412c lookup_template_class(tree_node*, tree_node*, tree_node*, tree_node*,
int, int)
        ???:0
0x8ca115 instantiate_decl(tree_node*, bool, bool)
        ???:0
0x7a2512 maybe_instantiate_decl(tree_node*)
        ???:0
0x7ffdcd mark_used(tree_node*, int)
        ???:0
0x73fd5e build_op_call(tree_node*, vec<tree_node*, va_gc, vl_embed>**, int)
        ???:0
0x90829a finish_call_expr(tree_node*, vec<tree_node*, va_gc, vl_embed>**, bool,
bool, int)
        ???:0
0x8d48af tsubst_expr(tree_node*, tree_node*, int, tree_node*)
        ???:0
0x8d7d7d tsubst(tree_node*, tree_node*, int, tree_node*)
        ???:0
0x8e1dcf tsubst_template_args(tree_node*, tree_node*, int, tree_node*)
        ???:0
0x8d72c8 tsubst(tree_node*, tree_node*, int, tree_node*)
        ???:0
0x8e093d instantiate_class_template(tree_node*)
        ???:0
0x93990b complete_type(tree_node*)
        ???:0
0x944bbb complete_type_or_maybe_complain(tree_node*, tree_node*, int)
        ???:0
Please submit a full bug report, with preprocessed source (by using
-freport-bug).
Please include the complete backtrace with any bug report.
See <https://gitlab.archlinux.org/archlinux/packaging/packages/gcc/-/issues>
for instructions.

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

* [Bug c++/116682] internal compiler error: in tsubst_expr, at cp/pt.cc:21463
  2024-09-11 15:08 [Bug c++/116682] New: internal compiler error: in tsubst_expr, at cp/pt.cc:21463 djnz00 at gmail dot com
@ 2024-09-11 15:12 ` djnz00 at gmail dot com
  2024-09-11 15:39 ` pinskia at gcc dot gnu.org
                   ` (10 subsequent siblings)
  11 siblings, 0 replies; 13+ messages in thread
From: djnz00 at gmail dot com @ 2024-09-11 15:12 UTC (permalink / raw)
  To: gcc-bugs

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

Huw Rogers <djnz00 at gmail dot com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Target|                            |x86_64-pc-linux-gnu
              Build|                            |x86_64-pc-linux-gnu
               Host|                            |x86_64-pc-linux-gnu
                URL|                            |https://github.com/djnz00/g
                   |                            |cc-bug/tree/main

--- Comment #1 from Huw Rogers <djnz00 at gmail dot com> ---
pre-processed source code is too large to attach here

see https://github.com/djnz00/gcc-bug/blob/main/gcc-bug.cc

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

* [Bug c++/116682] internal compiler error: in tsubst_expr, at cp/pt.cc:21463
  2024-09-11 15:08 [Bug c++/116682] New: internal compiler error: in tsubst_expr, at cp/pt.cc:21463 djnz00 at gmail dot com
  2024-09-11 15:12 ` [Bug c++/116682] " djnz00 at gmail dot com
@ 2024-09-11 15:39 ` pinskia at gcc dot gnu.org
  2024-09-11 15:47 ` pinskia at gcc dot gnu.org
                   ` (9 subsequent siblings)
  11 siblings, 0 replies; 13+ messages in thread
From: pinskia at gcc dot gnu.org @ 2024-09-11 15:39 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #2 from Andrew Pinski <pinskia at gcc dot gnu.org> ---
Created attachment 59097
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=59097&action=edit
Compressed testcase

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

* [Bug c++/116682] internal compiler error: in tsubst_expr, at cp/pt.cc:21463
  2024-09-11 15:08 [Bug c++/116682] New: internal compiler error: in tsubst_expr, at cp/pt.cc:21463 djnz00 at gmail dot com
  2024-09-11 15:12 ` [Bug c++/116682] " djnz00 at gmail dot com
  2024-09-11 15:39 ` pinskia at gcc dot gnu.org
@ 2024-09-11 15:47 ` pinskia at gcc dot gnu.org
  2024-09-13 18:25 ` pinskia at gcc dot gnu.org
                   ` (8 subsequent siblings)
  11 siblings, 0 replies; 13+ messages in thread
From: pinskia at gcc dot gnu.org @ 2024-09-11 15:47 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #3 from Andrew Pinski <pinskia at gcc dot gnu.org> ---
Reducing this ...

Note what was provided was basically an unincluded version which just happens
to be ok in this case but not always. Next time please provide the full
preprocessed source and you can compress it (xz, gzip, bzip2, etc.) if it is
too big.

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

* [Bug c++/116682] internal compiler error: in tsubst_expr, at cp/pt.cc:21463
  2024-09-11 15:08 [Bug c++/116682] New: internal compiler error: in tsubst_expr, at cp/pt.cc:21463 djnz00 at gmail dot com
                   ` (2 preceding siblings ...)
  2024-09-11 15:47 ` pinskia at gcc dot gnu.org
@ 2024-09-13 18:25 ` pinskia at gcc dot gnu.org
  2024-09-13 18:35 ` mpolacek at gcc dot gnu.org
                   ` (7 subsequent siblings)
  11 siblings, 0 replies; 13+ messages in thread
From: pinskia at gcc dot gnu.org @ 2024-09-13 18:25 UTC (permalink / raw)
  To: gcc-bugs

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

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

           What    |Removed                     |Added
----------------------------------------------------------------------------
           Keywords|                            |needs-reduction

--- Comment #4 from Andrew Pinski <pinskia at gcc dot gnu.org> ---
I am still reducing this.

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

* [Bug c++/116682] internal compiler error: in tsubst_expr, at cp/pt.cc:21463
  2024-09-11 15:08 [Bug c++/116682] New: internal compiler error: in tsubst_expr, at cp/pt.cc:21463 djnz00 at gmail dot com
                   ` (3 preceding siblings ...)
  2024-09-13 18:25 ` pinskia at gcc dot gnu.org
@ 2024-09-13 18:35 ` mpolacek at gcc dot gnu.org
  2024-09-13 22:23 ` pinskia at gcc dot gnu.org
                   ` (6 subsequent siblings)
  11 siblings, 0 replies; 13+ messages in thread
From: mpolacek at gcc dot gnu.org @ 2024-09-13 18:35 UTC (permalink / raw)
  To: gcc-bugs

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

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

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

--- Comment #5 from Marek Polacek <mpolacek at gcc dot gnu.org> ---
(In reply to Andrew Pinski from comment #4)
> I am still reducing this.

Thanks, it's a complicated test to reduce.  And it looks like the ICE goes
waaay back :/.  I couldn't bisect it precisely.

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

* [Bug c++/116682] internal compiler error: in tsubst_expr, at cp/pt.cc:21463
  2024-09-11 15:08 [Bug c++/116682] New: internal compiler error: in tsubst_expr, at cp/pt.cc:21463 djnz00 at gmail dot com
                   ` (4 preceding siblings ...)
  2024-09-13 18:35 ` mpolacek at gcc dot gnu.org
@ 2024-09-13 22:23 ` pinskia at gcc dot gnu.org
  2024-09-13 22:26 ` pinskia at gcc dot gnu.org
                   ` (5 subsequent siblings)
  11 siblings, 0 replies; 13+ messages in thread
From: pinskia at gcc dot gnu.org @ 2024-09-13 22:23 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #6 from Andrew Pinski <pinskia at gcc dot gnu.org> ---
Created attachment 59107
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=59107&action=edit
Mostly reduced

This is as far as I got. No more includes and less 40 lines.
And yes I think it is valid (had to change it back to being valid, tested with
clang).

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

* [Bug c++/116682] internal compiler error: in tsubst_expr, at cp/pt.cc:21463
  2024-09-11 15:08 [Bug c++/116682] New: internal compiler error: in tsubst_expr, at cp/pt.cc:21463 djnz00 at gmail dot com
                   ` (5 preceding siblings ...)
  2024-09-13 22:23 ` pinskia at gcc dot gnu.org
@ 2024-09-13 22:26 ` pinskia at gcc dot gnu.org
  2024-09-13 22:27 ` [Bug c++/116682] [12/13/14/15 Regression] " pinskia at gcc dot gnu.org
                   ` (4 subsequent siblings)
  11 siblings, 0 replies; 13+ messages in thread
From: pinskia at gcc dot gnu.org @ 2024-09-13 22:26 UTC (permalink / raw)
  To: gcc-bugs

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

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

           What    |Removed                     |Added
----------------------------------------------------------------------------
  Attachment #59107|0                           |1
        is obsolete|                            |

--- Comment #7 from Andrew Pinski <pinskia at gcc dot gnu.org> ---
Created attachment 59108
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=59108&action=edit
Slightly modified

Needed to fully define ZuMv for this to be valid (for some reason clang still
accepts it with a local type happening).

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

* [Bug c++/116682] [12/13/14/15 Regression] internal compiler error: in tsubst_expr, at cp/pt.cc:21463
  2024-09-11 15:08 [Bug c++/116682] New: internal compiler error: in tsubst_expr, at cp/pt.cc:21463 djnz00 at gmail dot com
                   ` (6 preceding siblings ...)
  2024-09-13 22:26 ` pinskia at gcc dot gnu.org
@ 2024-09-13 22:27 ` pinskia at gcc dot gnu.org
  2024-09-13 22:43 ` pinskia at gcc dot gnu.org
                   ` (3 subsequent siblings)
  11 siblings, 0 replies; 13+ messages in thread
From: pinskia at gcc dot gnu.org @ 2024-09-13 22:27 UTC (permalink / raw)
  To: gcc-bugs

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

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

           What    |Removed                     |Added
----------------------------------------------------------------------------
   Target Milestone|---                         |12.5
     Ever confirmed|0                           |1
            Summary|internal compiler error: in |[12/13/14/15 Regression]
                   |tsubst_expr, at             |internal compiler error: in
                   |cp/pt.cc:21463              |tsubst_expr, at
                   |                            |cp/pt.cc:21463
             Status|UNCONFIRMED                 |NEW
   Last reconfirmed|                            |2024-09-13
      Known to work|                            |7.5.0

--- Comment #8 from Andrew Pinski <pinskia at gcc dot gnu.org> ---
Confirmed. Worked in GCC 7.5.0.
Note my reduced testcase needs only -std=c++14.

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

* [Bug c++/116682] [12/13/14/15 Regression] internal compiler error: in tsubst_expr, at cp/pt.cc:21463
  2024-09-11 15:08 [Bug c++/116682] New: internal compiler error: in tsubst_expr, at cp/pt.cc:21463 djnz00 at gmail dot com
                   ` (7 preceding siblings ...)
  2024-09-13 22:27 ` [Bug c++/116682] [12/13/14/15 Regression] " pinskia at gcc dot gnu.org
@ 2024-09-13 22:43 ` pinskia at gcc dot gnu.org
  2024-09-13 23:00 ` [Bug c++/116682] [12/13/14/15 Regression] ICE with enum definition inside a generic lamda (inside a template function) argument converting to an int with constexpr pinskia at gcc dot gnu.org
                   ` (2 subsequent siblings)
  11 siblings, 0 replies; 13+ messages in thread
From: pinskia at gcc dot gnu.org @ 2024-09-13 22:43 UTC (permalink / raw)
  To: gcc-bugs

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

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

           What    |Removed                     |Added
----------------------------------------------------------------------------
  Attachment #59108|0                           |1
        is obsolete|                            |

--- Comment #9 from Andrew Pinski <pinskia at gcc dot gnu.org> ---
Created attachment 59109
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=59109&action=edit
Reduced all the way.

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

* [Bug c++/116682] [12/13/14/15 Regression] ICE with enum definition inside a generic lamda (inside a template function) argument converting to an int with constexpr
  2024-09-11 15:08 [Bug c++/116682] New: internal compiler error: in tsubst_expr, at cp/pt.cc:21463 djnz00 at gmail dot com
                   ` (8 preceding siblings ...)
  2024-09-13 22:43 ` pinskia at gcc dot gnu.org
@ 2024-09-13 23:00 ` pinskia at gcc dot gnu.org
  2024-09-16 14:14 ` ppalka at gcc dot gnu.org
  2024-09-18  2:45 ` ppalka at gcc dot gnu.org
  11 siblings, 0 replies; 13+ messages in thread
From: pinskia at gcc dot gnu.org @ 2024-09-13 23:00 UTC (permalink / raw)
  To: gcc-bugs

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

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

           What    |Removed                     |Added
----------------------------------------------------------------------------
            Summary|[12/13/14/15 Regression]    |[12/13/14/15 Regression]
                   |ICE with enum definition    |ICE with enum definition
                   |inside a generic lamda      |inside a generic lamda
                   |argument converting to an   |(inside a template
                   |int with constexpr          |function) argument
                   |                            |converting to an int with
                   |                            |constexpr
               Host|x86_64-pc-linux-gnu         |
             Target|x86_64-pc-linux-gnu         |
              Build|x86_64-pc-linux-gnu         |

--- Comment #10 from Andrew Pinski <pinskia at gcc dot gnu.org> ---
Doing instead of the enum:
```
      static constexpr int t = I;
      return t;
```
inside the lambda works.

making write a non template works too.

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

* [Bug c++/116682] [12/13/14/15 Regression] ICE with enum definition inside a generic lamda (inside a template function) argument converting to an int with constexpr
  2024-09-11 15:08 [Bug c++/116682] New: internal compiler error: in tsubst_expr, at cp/pt.cc:21463 djnz00 at gmail dot com
                   ` (9 preceding siblings ...)
  2024-09-13 23:00 ` [Bug c++/116682] [12/13/14/15 Regression] ICE with enum definition inside a generic lamda (inside a template function) argument converting to an int with constexpr pinskia at gcc dot gnu.org
@ 2024-09-16 14:14 ` ppalka at gcc dot gnu.org
  2024-09-18  2:45 ` ppalka at gcc dot gnu.org
  11 siblings, 0 replies; 13+ messages in thread
From: ppalka at gcc dot gnu.org @ 2024-09-16 14:14 UTC (permalink / raw)
  To: gcc-bugs

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

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

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

--- Comment #11 from Patrick Palka <ppalka at gcc dot gnu.org> ---
Seems there's another bug, unrelated to local enums.  If we replace the
problematic local enum:

@@ -67341,7 +67341,7 @@ public:
     ZuUnroll::all<WrRefs::N>([this, &o, &ok](auto I) {
       if (!ok) return;
       using Field = ZuType<I, Fields>;
-      enum { NDP = GetNDP<Field>{} };
+      static constexpr int NDP = GetNDP<Field>{};
       if constexpr (Field::Code == Float)
        ok = ok && m_wrRefs.template p<I>()->write(Field::get(o));
       else if constexpr (Field::Code == Fixed)

then we instead ICE from expand_expr_real_1.

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

* [Bug c++/116682] [12/13/14/15 Regression] ICE with enum definition inside a generic lamda (inside a template function) argument converting to an int with constexpr
  2024-09-11 15:08 [Bug c++/116682] New: internal compiler error: in tsubst_expr, at cp/pt.cc:21463 djnz00 at gmail dot com
                   ` (10 preceding siblings ...)
  2024-09-16 14:14 ` ppalka at gcc dot gnu.org
@ 2024-09-18  2:45 ` ppalka at gcc dot gnu.org
  11 siblings, 0 replies; 13+ messages in thread
From: ppalka at gcc dot gnu.org @ 2024-09-18  2:45 UTC (permalink / raw)
  To: gcc-bugs

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

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

           What    |Removed                     |Added
----------------------------------------------------------------------------
           See Also|                            |https://gcc.gnu.org/bugzill
                   |                            |a/show_bug.cgi?id=116756

--- Comment #12 from Patrick Palka <ppalka at gcc dot gnu.org> ---
(In reply to Patrick Palka from comment #11)
> Seems there's another bug, unrelated to local enums.  If we replace the
> problematic local enum:
> then we instead ICE from expand_expr_real_1.
Reduced and reported as PR116756

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

end of thread, other threads:[~2024-09-18  2:45 UTC | newest]

Thread overview: 13+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2024-09-11 15:08 [Bug c++/116682] New: internal compiler error: in tsubst_expr, at cp/pt.cc:21463 djnz00 at gmail dot com
2024-09-11 15:12 ` [Bug c++/116682] " djnz00 at gmail dot com
2024-09-11 15:39 ` pinskia at gcc dot gnu.org
2024-09-11 15:47 ` pinskia at gcc dot gnu.org
2024-09-13 18:25 ` pinskia at gcc dot gnu.org
2024-09-13 18:35 ` mpolacek at gcc dot gnu.org
2024-09-13 22:23 ` pinskia at gcc dot gnu.org
2024-09-13 22:26 ` pinskia at gcc dot gnu.org
2024-09-13 22:27 ` [Bug c++/116682] [12/13/14/15 Regression] " pinskia at gcc dot gnu.org
2024-09-13 22:43 ` pinskia at gcc dot gnu.org
2024-09-13 23:00 ` [Bug c++/116682] [12/13/14/15 Regression] ICE with enum definition inside a generic lamda (inside a template function) argument converting to an int with constexpr pinskia at gcc dot gnu.org
2024-09-16 14:14 ` ppalka at gcc dot gnu.org
2024-09-18  2:45 ` 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).