From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 052E5385840F; Tue, 25 Jul 2023 18:42:33 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 052E5385840F DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1690310553; bh=1eQYe/JNvSK2KhXR6X4I7Y9KTo9WeHz+JONVyA7FKVI=; h=From:To:Subject:Date:From; b=qQ8kVfapOn1NovJnuWt6zMK1wqZNswASt5HE7yUzeYiRC4zLLMLgi35r7EWE063Ps sHSNKc+76zJhTA4qKk/y2J9AMbapYqmE8AL4auk7JBFrVIfKwRabx57MkDkmRDZFn1 +XmkzIg5e7UKmh41cQWcCYJwZnPIQiaSaEvx372I= From: "mihi32 at gmail dot com" To: gcc-bugs@gcc.gnu.org Subject: [Bug c++/110808] New: [modules] Internal Compiler Error in check_mergeable_decl Date: Tue, 25 Jul 2023 18:42:32 +0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: new X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: c++ X-Bugzilla-Version: 12.1.0 X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: mihi32 at gmail dot com X-Bugzilla-Status: UNCONFIRMED X-Bugzilla-Resolution: X-Bugzilla-Priority: P3 X-Bugzilla-Assigned-To: unassigned at gcc dot gnu.org X-Bugzilla-Target-Milestone: --- X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: bug_id short_desc product version bug_status bug_severity priority component assigned_to reporter target_milestone attachments.created Message-ID: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Bugzilla-URL: http://gcc.gnu.org/bugzilla/ Auto-Submitted: auto-generated MIME-Version: 1.0 List-Id: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=3D110808 Bug ID: 110808 Summary: [modules] Internal Compiler Error in check_mergeable_decl Product: gcc Version: 12.1.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: c++ Assignee: unassigned at gcc dot gnu.org Reporter: mihi32 at gmail dot com Target Milestone: --- Created attachment 55632 --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=3D55632&action=3Dedit Archive with the 3 cpp files that reproduce the error. // tres.cpp export module group:tres; int mul() { return 0; } // group.cpp export module group; export import :tres; // main.cpp import group:tres; int main()=20 { return mul(); } -------------------------------------------------------------------- $ g++-12 -freport-bug -std=3Dc++20 -fmodules-ts tres.cpp group.cpp main.cpp= -o main main.cpp: In function =E2=80=98int main()=E2=80=99: main.cpp:5:16: internal compiler error: Segmentation fault 5 | return mul(); | ^~~ 0xd910e3 crash_signal ../../src/gcc/toplev.cc:322 0x7facc691751f ??? ./signal/../sysdeps/unix/sysv/linux/x86_64/libc_sigaction.c:0 0x76fc34 ovl_iterator::operator*() const ../../src/gcc/cp/cp-tree.h:842 0x76fc34 check_mergeable_decl ../../src/gcc/cp/module.cc:10570 0x792150 trees_in::key_mergeable(int, merge_kind, tree_node*, tree_node*, tree_node*, tree_node*, bool) ../../src/gcc/cp/module.cc:10805 0x794f14 trees_in::decl_value() ../../src/gcc/cp/module.cc:7921 0x78fa77 trees_in::tree_node(bool) ../../src/gcc/cp/module.cc:9172 0x795b4b module_state::read_cluster(unsigned int) ../../src/gcc/cp/module.cc:14838 0x7960a5 module_state::load_section(unsigned int, binding_slot*) ../../src/gcc/cp/module.cc:18109 0x796237 lazy_load_binding(unsigned int, tree_node*, tree_node*, binding_sl= ot*) ../../src/gcc/cp/module.cc:18801 0x7a3ec4 name_lookup::search_namespace_only(tree_node*) ../../src/gcc/cp/name-lookup.cc:919 0x7a523b name_lookup::search_unqualified(tree_node*, cp_binding_level*) ../../src/gcc/cp/name-lookup.cc:1142 0x7a6fab lookup_name(tree_node*, LOOK_where, LOOK_want) ../../src/gcc/cp/name-lookup.cc:7774 0x7aee01 lookup_name(tree_node*, LOOK_want) ../../src/gcc/cp/name-lookup.h:404 0x7aee01 cp_parser_lookup_name ../../src/gcc/cp/parser.cc:30605 0x7dd045 cp_parser_class_name ../../src/gcc/cp/parser.cc:25693 0x7dd31c cp_parser_type_name ../../src/gcc/cp/parser.cc:20140 0x7ebee0 cp_parser_simple_type_specifier ../../src/gcc/cp/parser.cc:19831 0x7d27fa cp_parser_postfix_expression ../../src/gcc/cp/parser.cc:7573 0x7bc7c6 cp_parser_binary_expression ../../src/gcc/cp/parser.cc:10035 Please submit a full bug report, with preprocessed source. Please include the complete backtrace with any bug report. See for instructions. The bug is not reproducible, so it is likely a hardware or OS problem. ----------------------------------------------------- $ g++-12 -v Using built-in specs. COLLECT_GCC=3Dg++-12 COLLECT_LTO_WRAPPER=3D/usr/lib/gcc/x86_64-linux-gnu/12/lto-wrapper OFFLOAD_TARGET_NAMES=3Dnvptx-none:amdgcn-amdhsa OFFLOAD_TARGET_DEFAULT=3D1 Target: x86_64-linux-gnu Configured with: ../src/configure -v --with-pkgversion=3D'Ubuntu 12.1.0-2ubuntu1~22.04' --with-bugurl=3Dfile:///usr/share/doc/gcc-12/README.= Bugs --enable-languages=3Dc,ada,c++,go,d,fortran,objc,obj-c++,m2 --prefix=3D/usr --with-gcc-major-version-only --program-suffix=3D-12 --program-prefix=3Dx86_64-linux-gnu- --enable-shared --enable-linker-build-= id --libexecdir=3D/usr/lib --without-included-gettext --enable-threads=3Dposix --libdir=3D/usr/lib --enable-nls --enable-clocale=3Dgnu --enable-libstdcxx-= debug --enable-libstdcxx-time=3Dyes --with-default-libstdcxx-abi=3Dnew --enable-gnu-unique-object --disable-vtable-verify --enable-plugin --enable-default-pie --with-system-zlib --enable-libphobos-checking=3Drelea= se --with-target-system-zlib=3Dauto --enable-objc-gc=3Dauto --enable-multiarch --disable-werror --enable-cet --with-arch-32=3Di686 --with-abi=3Dm64 --with-multilib-list=3Dm32,m64,mx32 --enable-multilib --with-tune=3Dgeneric --enable-offload-targets=3Dnvptx-none=3D/build/gcc-12-sZcx2y/gcc-12-12.1.0/= debian/tmp-nvptx/usr,amdgcn-amdhsa=3D/build/gcc-12-sZcx2y/gcc-12-12.1.0/deb= ian/tmp-gcn/usr --enable-offload-defaulted --without-cuda-driver --enable-checking=3Drelease --build=3Dx86_64-linux-gnu --host=3Dx86_64-linux-gnu --target=3Dx86_64-linu= x-gnu Thread model: posix Supported LTO compression algorithms: zlib zstd gcc version 12.1.0 (Ubuntu 12.1.0-2ubuntu1~22.04)=