public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c++/103081] New: [ICE] with "using enum"
@ 2021-11-04 14:30 terra at gnome dot org
  2021-11-04 14:51 ` [Bug c++/103081] " mpolacek at gcc dot gnu.org
                   ` (13 more replies)
  0 siblings, 14 replies; 15+ messages in thread
From: terra at gnome dot org @ 2021-11-04 14:30 UTC (permalink / raw)
  To: gcc-bugs

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

            Bug ID: 103081
           Summary: [ICE] with "using enum"
           Product: gcc
           Version: 11.1.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: c++
          Assignee: unassigned at gcc dot gnu.org
          Reporter: terra at gnome dot org
  Target Milestone: ---

This code triggers an internal compiler error.

------------------------------------------------
enum class Pig { OINK };

struct Hog {
  using enum Pig;
  Hog(Pig) { }
};

template <unsigned>
void pen() {
  (void)Hog(Hog::OINK);
}

void pen() {
  pen<0>();
}
------------------------------------------------


.../gcc/11.1.0/bin/g++  -D_FILE_OFFSET_BITS=64 -D_LARGEFILE64_SOURCE
-pedantic-errors -Wall -Wno-unknown-pragmas -W -fsigned-char -malign-data=abi
-fno-semantic-interposition -gz=zlib-gnu -c -march=westmere -mmmx -mno-3dnow
-msse -msse2 -msse3 -mssse3 -mno-sse4a -mcx16 -msahf -mno-movbe -mno-aes
-mno-sha -mno-pclmul -mpopcnt -mno-abm -mno-lwp -mno-fma -mno-fma4 -mno-xop
-mno-bmi -mno-sgx -mno-bmi2 -mno-tbm -mno-avx -mno-avx2 -msse4.2 -msse4.1
-mno-lzcnt -mno-rtm -mno-hle -mno-rdrnd -mno-f16c -mno-fsgsbase -mno-rdseed
-mno-prfchw -mno-adx -mfxsr -mno-xsave -mno-xsaveopt -mno-avx512f -mno-avx512er
-mno-avx512cd -mno-avx512pf -mno-prefetchwt1 -mno-clflushopt -mno-xsavec
-mno-xsaves -mno-avx512dq -mno-avx512bw -mno-avx512vl -mno-avx512ifma
-mno-avx512vbmi -mno-avx5124fmaps -mno-avx5124vnniw -mno-clwb -mno-mwaitx
-mno-clzero -mno-pku -mno-rdpid --param "l1-cache-size=32" --param
"l1-cache-line-size=64" --param "l2-cache-size=12288" -mtune=westmere
-std=gnu++20 -Wrestrict -Wdangling-else -Wno-placement-new
-Wno-deprecated-declarations -fno-strict-overflow
-Wzero-as-null-pointer-constant -Wwrite-strings -Wno-ignored-qualifiers
-Wno-array-bounds -Wno-mismatched-new-delete -Wdeprecated-copy
-Wdeprecated-copy-dtor -Wredundant-move -m32 -mfpmath=sse -Woverloaded-virtual
-fPIC -g -o /home/welinder/using-enum_L111a3.o /home/welinder/using-enum.C
/home/welinder/using-enum.C: In instantiation of ‘void pen() [with unsigned int
<anonymous> = 0]’:
/home/welinder/using-enum.C:14:9:   required from here
/home/welinder/using-enum.C:10:18: internal compiler error: in tsubst_copy, at
cp/pt.c:16715
   10 |   (void)Hog(Hog::OINK);
      |             ~~~~~^~~~
0x669a60 tsubst_copy
        ../../../gcc-11.1.0/gcc/cp/pt.c:16715
0x802d0c tsubst_qualified_id
        ../../../gcc-11.1.0/gcc/cp/pt.c:16449
0x8041b6 tsubst_copy_and_build(tree_node*, tree_node*, int, tree_node*, bool,
bool)
        ../../../gcc-11.1.0/gcc/cp/pt.c:19948
0x814e01 tsubst_copy_and_build(tree_node*, tree_node*, int, tree_node*, bool,
bool)
        ../../../gcc-11.1.0/gcc/cp/pt.c:19587
0x814e01 tsubst_tree_list(tree_node*, tree_node*, int, tree_node*)
        ../../../gcc-11.1.0/gcc/cp/pt.c:15417
0x8037fa tsubst_copy_and_build(tree_node*, tree_node*, int, tree_node*, bool,
bool)
        ../../../gcc-11.1.0/gcc/cp/pt.c:20586
0x804f67 tsubst_copy_and_build(tree_node*, tree_node*, int, tree_node*, bool,
bool)
        ../../../gcc-11.1.0/gcc/cp/pt.c:19587
0x804f67 tsubst_copy_and_build(tree_node*, tree_node*, int, tree_node*, bool,
bool)
        ../../../gcc-11.1.0/gcc/cp/pt.c:19797
0x814e01 tsubst_copy_and_build(tree_node*, tree_node*, int, tree_node*, bool,
bool)
        ../../../gcc-11.1.0/gcc/cp/pt.c:19587
0x814e01 tsubst_tree_list(tree_node*, tree_node*, int, tree_node*)
        ../../../gcc-11.1.0/gcc/cp/pt.c:15417
0x8037fa tsubst_copy_and_build(tree_node*, tree_node*, int, tree_node*, bool,
bool)
        ../../../gcc-11.1.0/gcc/cp/pt.c:20586
0x804f67 tsubst_copy_and_build(tree_node*, tree_node*, int, tree_node*, bool,
bool)
        ../../../gcc-11.1.0/gcc/cp/pt.c:19587
0x804f67 tsubst_copy_and_build(tree_node*, tree_node*, int, tree_node*, bool,
bool)
        ../../../gcc-11.1.0/gcc/cp/pt.c:19797
0x815114 tsubst_copy_and_build(tree_node*, tree_node*, int, tree_node*, bool,
bool)
        ../../../gcc-11.1.0/gcc/cp/pt.c:19587
0x815114 tsubst_expr(tree_node*, tree_node*, int, tree_node*, bool)
        ../../../gcc-11.1.0/gcc/cp/pt.c:19198
0x816181 tsubst_expr(tree_node*, tree_node*, int, tree_node*, bool)
        ../../../gcc-11.1.0/gcc/cp/pt.c:18223
0x816181 tsubst_expr(tree_node*, tree_node*, int, tree_node*, bool)
        ../../../gcc-11.1.0/gcc/cp/pt.c:18268
0x815c4f tsubst_expr(tree_node*, tree_node*, int, tree_node*, bool)
        ../../../gcc-11.1.0/gcc/cp/pt.c:18223
0x815c4f tsubst_expr(tree_node*, tree_node*, int, tree_node*, bool)
        ../../../gcc-11.1.0/gcc/cp/pt.c:18589
0x809719 tsubst_expr(tree_node*, tree_node*, int, tree_node*, bool)
        ../../../gcc-11.1.0/gcc/cp/pt.c:25909
Please submit a full bug report,
with preprocessed source if appropriate.
Please include the complete backtrace with any bug report.
See <https://gcc.gnu.org/bugs/> for instructions.
Return code for compiling using-enum.C: 1


This is an x86_64 system running OpenSuSE 15.2.

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

* [Bug c++/103081] [ICE] with "using enum"
  2021-11-04 14:30 [Bug c++/103081] New: [ICE] with "using enum" terra at gnome dot org
@ 2021-11-04 14:51 ` mpolacek at gcc dot gnu.org
  2021-11-04 14:56 ` mpolacek at gcc dot gnu.org
                   ` (12 subsequent siblings)
  13 siblings, 0 replies; 15+ messages in thread
From: mpolacek at gcc dot gnu.org @ 2021-11-04 14:51 UTC (permalink / raw)
  To: gcc-bugs

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

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

           What    |Removed                     |Added
----------------------------------------------------------------------------
     Ever confirmed|0                           |1
   Last reconfirmed|                            |2021-11-04
           Keywords|                            |ice-on-valid-code
                 CC|                            |mpolacek at gcc dot gnu.org
             Status|UNCONFIRMED                 |NEW

--- Comment #1 from Marek Polacek <mpolacek at gcc dot gnu.org> ---
Confirmed.

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

* [Bug c++/103081] [ICE] with "using enum"
  2021-11-04 14:30 [Bug c++/103081] New: [ICE] with "using enum" terra at gnome dot org
  2021-11-04 14:51 ` [Bug c++/103081] " mpolacek at gcc dot gnu.org
@ 2021-11-04 14:56 ` mpolacek at gcc dot gnu.org
  2021-11-04 14:57 ` rguenth at gcc dot gnu.org
                   ` (11 subsequent siblings)
  13 siblings, 0 replies; 15+ messages in thread
From: mpolacek at gcc dot gnu.org @ 2021-11-04 14:56 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #2 from Marek Polacek <mpolacek at gcc dot gnu.org> ---
Started with r11-5003.

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

* [Bug c++/103081] [ICE] with "using enum"
  2021-11-04 14:30 [Bug c++/103081] New: [ICE] with "using enum" terra at gnome dot org
  2021-11-04 14:51 ` [Bug c++/103081] " mpolacek at gcc dot gnu.org
  2021-11-04 14:56 ` mpolacek at gcc dot gnu.org
@ 2021-11-04 14:57 ` rguenth at gcc dot gnu.org
  2021-11-04 15:15 ` terra at gnome dot org
                   ` (10 subsequent siblings)
  13 siblings, 0 replies; 15+ messages in thread
From: rguenth at gcc dot gnu.org @ 2021-11-04 14:57 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #3 from Richard Biener <rguenth at gcc dot gnu.org> ---
Confirmed on the GCC 11 branch head and trunk.  clang complains:

> clang++-11 -S t.C -std=c++20
t.C:4:9: error: expected unqualified-id
  using enum Pig;
        ^
t.C:10:18: error: no member named 'OINK' in 'Hog'
  (void)Hog(Hog::OINK);
            ~~~~~^
2 errors generated.

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

* [Bug c++/103081] [ICE] with "using enum"
  2021-11-04 14:30 [Bug c++/103081] New: [ICE] with "using enum" terra at gnome dot org
                   ` (2 preceding siblings ...)
  2021-11-04 14:57 ` rguenth at gcc dot gnu.org
@ 2021-11-04 15:15 ` terra at gnome dot org
  2022-10-30 18:54 ` pinskia at gcc dot gnu.org
                   ` (9 subsequent siblings)
  13 siblings, 0 replies; 15+ messages in thread
From: terra at gnome dot org @ 2021-11-04 15:15 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #4 from M Welinder <terra at gnome dot org> ---
That version of clang does not do "using enum" at all.  clang 13 accepts this
code, but it has other issues with "using enum".

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

* [Bug c++/103081] [ICE] with "using enum"
  2021-11-04 14:30 [Bug c++/103081] New: [ICE] with "using enum" terra at gnome dot org
                   ` (3 preceding siblings ...)
  2021-11-04 15:15 ` terra at gnome dot org
@ 2022-10-30 18:54 ` pinskia at gcc dot gnu.org
  2022-10-30 18:55 ` pinskia at gcc dot gnu.org
                   ` (8 subsequent siblings)
  13 siblings, 0 replies; 15+ messages in thread
From: pinskia at gcc dot gnu.org @ 2022-10-30 18:54 UTC (permalink / raw)
  To: gcc-bugs

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

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

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |tamas+gcc@hudson-trading.co
                   |                            |m

--- Comment #5 from Andrew Pinski <pinskia at gcc dot gnu.org> ---
*** Bug 105787 has been marked as a duplicate of this bug. ***

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

* [Bug c++/103081] [ICE] with "using enum"
  2021-11-04 14:30 [Bug c++/103081] New: [ICE] with "using enum" terra at gnome dot org
                   ` (4 preceding siblings ...)
  2022-10-30 18:54 ` pinskia at gcc dot gnu.org
@ 2022-10-30 18:55 ` pinskia at gcc dot gnu.org
  2022-10-31  0:30 ` chris-gcc-bugzilla at cybermato dot com
                   ` (7 subsequent siblings)
  13 siblings, 0 replies; 15+ messages in thread
From: pinskia at gcc dot gnu.org @ 2022-10-30 18:55 UTC (permalink / raw)
  To: gcc-bugs

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

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

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |doodspav at gmail dot com

--- Comment #6 from Andrew Pinski <pinskia at gcc dot gnu.org> ---
*** Bug 104398 has been marked as a duplicate of this bug. ***

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

* [Bug c++/103081] [ICE] with "using enum"
  2021-11-04 14:30 [Bug c++/103081] New: [ICE] with "using enum" terra at gnome dot org
                   ` (5 preceding siblings ...)
  2022-10-30 18:55 ` pinskia at gcc dot gnu.org
@ 2022-10-31  0:30 ` chris-gcc-bugzilla at cybermato dot com
  2022-10-31  0:32 ` pinskia at gcc dot gnu.org
                   ` (6 subsequent siblings)
  13 siblings, 0 replies; 15+ messages in thread
From: chris-gcc-bugzilla at cybermato dot com @ 2022-10-31  0:30 UTC (permalink / raw)
  To: gcc-bugs

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

Chris MacGregor <chris-gcc-bugzilla at cybermato dot com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |chris-gcc-bugzilla@cybermat
                   |                            |o.com

--- Comment #7 from Chris MacGregor <chris-gcc-bugzilla at cybermato dot com> ---
Created attachment 53800
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=53800&action=edit
testcase originally for bug 107460

Now that bug 107460 (ICE with "using enum" member passed to template function,
g++ 11.x-13) is marked a dup of this (indirectly, via bug 105787), attaching
the testcase here; hopefully that's helpful.

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

* [Bug c++/103081] [ICE] with "using enum"
  2021-11-04 14:30 [Bug c++/103081] New: [ICE] with "using enum" terra at gnome dot org
                   ` (6 preceding siblings ...)
  2022-10-31  0:30 ` chris-gcc-bugzilla at cybermato dot com
@ 2022-10-31  0:32 ` pinskia at gcc dot gnu.org
  2022-10-31  0:50 ` chris-gcc-bugzilla at cybermato dot com
                   ` (5 subsequent siblings)
  13 siblings, 0 replies; 15+ messages in thread
From: pinskia at gcc dot gnu.org @ 2022-10-31  0:32 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #8 from Andrew Pinski <pinskia at gcc dot gnu.org> ---
*** Bug 107460 has been marked as a duplicate of this bug. ***

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

* [Bug c++/103081] [ICE] with "using enum"
  2021-11-04 14:30 [Bug c++/103081] New: [ICE] with "using enum" terra at gnome dot org
                   ` (7 preceding siblings ...)
  2022-10-31  0:32 ` pinskia at gcc dot gnu.org
@ 2022-10-31  0:50 ` chris-gcc-bugzilla at cybermato dot com
  2022-12-02 19:13 ` ppalka at gcc dot gnu.org
                   ` (4 subsequent siblings)
  13 siblings, 0 replies; 15+ messages in thread
From: chris-gcc-bugzilla at cybermato dot com @ 2022-10-31  0:50 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #9 from Chris MacGregor <chris-gcc-bugzilla at cybermato dot com> ---
With the testcase I just attached, using 13.0.0 20221030 via Godbolt:
https://godbolt.org/z/8Y4cr6MxY

<source>: In instantiation of 'Event::Event(EventCat, auto:1) [with auto:1 =
int]':
<source>:38:32:   required from here
<source>:30:30: internal compiler error: tree check: expected enumeral_type,
have record_type in tsubst_copy, at cp/pt.cc:17024
   30 |         boundsCheck<EventCat>(a_category, kEventCat_Min);  // using
"EventCat::kEventCat_Min" instead of just "kEventCat_Min" makes this not fail
      |         ~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~

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

* [Bug c++/103081] [ICE] with "using enum"
  2021-11-04 14:30 [Bug c++/103081] New: [ICE] with "using enum" terra at gnome dot org
                   ` (8 preceding siblings ...)
  2022-10-31  0:50 ` chris-gcc-bugzilla at cybermato dot com
@ 2022-12-02 19:13 ` ppalka at gcc dot gnu.org
  2022-12-03 15:28 ` cvs-commit at gcc dot gnu.org
                   ` (3 subsequent siblings)
  13 siblings, 0 replies; 15+ messages in thread
From: ppalka at gcc dot gnu.org @ 2022-12-02 19:13 UTC (permalink / raw)
  To: gcc-bugs

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

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

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

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

* [Bug c++/103081] [ICE] with "using enum"
  2021-11-04 14:30 [Bug c++/103081] New: [ICE] with "using enum" terra at gnome dot org
                   ` (9 preceding siblings ...)
  2022-12-02 19:13 ` ppalka at gcc dot gnu.org
@ 2022-12-03 15:28 ` cvs-commit at gcc dot gnu.org
  2022-12-03 15:29 ` ppalka at gcc dot gnu.org
                   ` (2 subsequent siblings)
  13 siblings, 0 replies; 15+ messages in thread
From: cvs-commit at gcc dot gnu.org @ 2022-12-03 15:28 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #10 from CVS Commits <cvs-commit at gcc dot gnu.org> ---
The master branch has been updated by Patrick Palka <ppalka@gcc.gnu.org>:

https://gcc.gnu.org/g:b3912122c9dfaba6c8229e8f095885f69782ceda

commit r13-4477-gb3912122c9dfaba6c8229e8f095885f69782ceda
Author: Patrick Palka <ppalka@redhat.com>
Date:   Sat Dec 3 10:28:25 2022 -0500

    c++: substituting CONST_DECL_USING_P enumerators [PR103081]

    We implement class-scope using enum by injecting clones of the enum's
    CONST_DECLs as fields of the class, for which CONST_DECL_USING_P is
    true, so that qualified lookup naturally finds the enumerators.
    Substitution into such a CONST_DECL currently ICEs however, because we
    assume the DECL_CONTEXT is always the ENUMERAL_TYPE (which has
    TYPE_VALUES) but in this case it's the RECORD_TYPE for the class scope
    (which has TYPE_FIELDS).

    Since these CONST_DECLs appear to always be non-dependent, this patch
    fixes this by shortcutting substitution for CONST_DECLs that have
    non-dependent DECL_CONTEXT.  This subsumes the existing (and seemingly
    dead) DECL_NAMESPACE_SCOPE_P early exit test and also benefits
    substitution into ordinary non-dependent CONST_DECLs.

            PR c++/103081

    gcc/cp/ChangeLog:

            * pt.cc (tsubst_copy) <case CONST_DECL>: Generalize
            early exit test for namespace-scope decls to check dependence of
            the enclosing scope instead.  Remove dead early exit test.

    gcc/testsuite/ChangeLog:

            * g++.dg/cpp2a/using-enum-10.C: New test.
            * g++.dg/cpp2a/using-enum-10a.C: New test.

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

* [Bug c++/103081] [ICE] with "using enum"
  2021-11-04 14:30 [Bug c++/103081] New: [ICE] with "using enum" terra at gnome dot org
                   ` (10 preceding siblings ...)
  2022-12-03 15:28 ` cvs-commit at gcc dot gnu.org
@ 2022-12-03 15:29 ` ppalka at gcc dot gnu.org
  2022-12-19 16:54 ` cvs-commit at gcc dot gnu.org
  2022-12-19 16:56 ` ppalka at gcc dot gnu.org
  13 siblings, 0 replies; 15+ messages in thread
From: ppalka at gcc dot gnu.org @ 2022-12-03 15:29 UTC (permalink / raw)
  To: gcc-bugs

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

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

           What    |Removed                     |Added
----------------------------------------------------------------------------
   Target Milestone|---                         |12.3

--- Comment #11 from Patrick Palka <ppalka at gcc dot gnu.org> ---
Fixed on trunk so far.

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

* [Bug c++/103081] [ICE] with "using enum"
  2021-11-04 14:30 [Bug c++/103081] New: [ICE] with "using enum" terra at gnome dot org
                   ` (11 preceding siblings ...)
  2022-12-03 15:29 ` ppalka at gcc dot gnu.org
@ 2022-12-19 16:54 ` cvs-commit at gcc dot gnu.org
  2022-12-19 16:56 ` ppalka at gcc dot gnu.org
  13 siblings, 0 replies; 15+ messages in thread
From: cvs-commit at gcc dot gnu.org @ 2022-12-19 16:54 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #12 from CVS Commits <cvs-commit at gcc dot gnu.org> ---
The releases/gcc-12 branch has been updated by Patrick Palka
<ppalka@gcc.gnu.org>:

https://gcc.gnu.org/g:648db321893acabd06c24da149c09fceab4daeff

commit r12-8995-g648db321893acabd06c24da149c09fceab4daeff
Author: Patrick Palka <ppalka@redhat.com>
Date:   Sat Dec 3 10:28:25 2022 -0500

    c++: substituting CONST_DECL_USING_P enumerators [PR103081]

    We implement class-scope using enum by injecting clones of the enum's
    CONST_DECLs as fields of the class, for which CONST_DECL_USING_P is
    true, so that qualified lookup naturally finds the enumerators.
    Substitution into such a CONST_DECL currently ICEs however, because we
    assume the DECL_CONTEXT is always the ENUMERAL_TYPE (which has
    TYPE_VALUES) but in this case it's the RECORD_TYPE for the class scope
    (which has TYPE_FIELDS).

    Since these CONST_DECLs appear to always be non-dependent, this patch
    fixes this by shortcutting substitution for CONST_DECLs that have
    non-dependent DECL_CONTEXT.  This subsumes the existing (and seemingly
    dead) DECL_NAMESPACE_SCOPE_P early exit test and also benefits
    substitution into ordinary non-dependent CONST_DECLs.

            PR c++/103081

    gcc/cp/ChangeLog:

            * pt.cc (tsubst_copy) <case CONST_DECL>: Generalize
            early exit test for namespace-scope decls to check dependence of
            the enclosing scope instead.  Remove dead early exit test.

    gcc/testsuite/ChangeLog:

            * g++.dg/cpp2a/using-enum-10.C: New test.
            * g++.dg/cpp2a/using-enum-10a.C: New test.

    (cherry picked from commit b3912122c9dfaba6c8229e8f095885f69782ceda)

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

* [Bug c++/103081] [ICE] with "using enum"
  2021-11-04 14:30 [Bug c++/103081] New: [ICE] with "using enum" terra at gnome dot org
                   ` (12 preceding siblings ...)
  2022-12-19 16:54 ` cvs-commit at gcc dot gnu.org
@ 2022-12-19 16:56 ` ppalka at gcc dot gnu.org
  13 siblings, 0 replies; 15+ messages in thread
From: ppalka at gcc dot gnu.org @ 2022-12-19 16:56 UTC (permalink / raw)
  To: gcc-bugs

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

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

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

--- Comment #13 from Patrick Palka <ppalka at gcc dot gnu.org> ---
Fixed for GCC 12.3/13, thanks for the bug report.

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

end of thread, other threads:[~2022-12-19 16:56 UTC | newest]

Thread overview: 15+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-11-04 14:30 [Bug c++/103081] New: [ICE] with "using enum" terra at gnome dot org
2021-11-04 14:51 ` [Bug c++/103081] " mpolacek at gcc dot gnu.org
2021-11-04 14:56 ` mpolacek at gcc dot gnu.org
2021-11-04 14:57 ` rguenth at gcc dot gnu.org
2021-11-04 15:15 ` terra at gnome dot org
2022-10-30 18:54 ` pinskia at gcc dot gnu.org
2022-10-30 18:55 ` pinskia at gcc dot gnu.org
2022-10-31  0:30 ` chris-gcc-bugzilla at cybermato dot com
2022-10-31  0:32 ` pinskia at gcc dot gnu.org
2022-10-31  0:50 ` chris-gcc-bugzilla at cybermato dot com
2022-12-02 19:13 ` ppalka at gcc dot gnu.org
2022-12-03 15:28 ` cvs-commit at gcc dot gnu.org
2022-12-03 15:29 ` ppalka at gcc dot gnu.org
2022-12-19 16:54 ` cvs-commit at gcc dot gnu.org
2022-12-19 16:56 ` 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).