public inbox for gcc-bugs@sourceware.org help / color / mirror / Atom feed
From: "terra at gnome dot org" <gcc-bugzilla@gcc.gnu.org> To: gcc-bugs@gcc.gnu.org Subject: [Bug c++/103081] New: [ICE] with "using enum" Date: Thu, 04 Nov 2021 14:30:26 +0000 [thread overview] Message-ID: <bug-103081-4@http.gcc.gnu.org/bugzilla/> (raw) 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.
next reply other threads:[~2021-11-04 14:30 UTC|newest] Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top 2021-11-04 14:30 terra at gnome dot org [this message] 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
Reply instructions: You may reply publicly to this message via plain-text email using any one of the following methods: * Save the following mbox file, import it into your mail client, and reply-to-all from there: mbox Avoid top-posting and favor interleaved quoting: https://en.wikipedia.org/wiki/Posting_style#Interleaved_style * Reply using the --to, --cc, and --in-reply-to switches of git-send-email(1): git send-email \ --in-reply-to=bug-103081-4@http.gcc.gnu.org/bugzilla/ \ --to=gcc-bugzilla@gcc.gnu.org \ --cc=gcc-bugs@gcc.gnu.org \ /path/to/YOUR_REPLY https://kernel.org/pub/software/scm/git/docs/git-send-email.html * If your mail client supports setting the In-Reply-To header via mailto: links, try the mailto: linkBe sure your reply has a Subject: header at the top and a blank line before the message body.
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).