public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c++/99769] New: [modules] internal compiler error: in tree_node, at cp/module.cc:9105 when compile module partitions
@ 2021-03-25 12:11 owt5008137 at live dot com
  2021-03-30  1:29 ` [Bug c++/99769] " mpolacek at gcc dot gnu.org
                   ` (4 more replies)
  0 siblings, 5 replies; 6+ messages in thread
From: owt5008137 at live dot com @ 2021-03-25 12:11 UTC (permalink / raw)
  To: gcc-bugs

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

            Bug ID: 99769
           Summary: [modules] internal compiler error: in tree_node, at
                    cp/module.cc:9105 when compile module partitions
           Product: gcc
           Version: 11.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: c++
          Assignee: unassigned at gcc dot gnu.org
          Reporter: owt5008137 at live dot com
  Target Milestone: ---

Compiling modules with partitions always failed.The commands and files to
reproduce this are below:

$ /opt/gcc-latest/bin/g++ -v
Using built-in specs.
COLLECT_GCC=/opt/gcc-latest/bin/g++
COLLECT_LTO_WRAPPER=/opt/gcc-latest/libexec/gcc/x86_64-pc-linux-gnu/11.0.1/lto-wrapper
Target: x86_64-pc-linux-gnu
Configured with: ../configure --prefix=/opt/gcc-latest --enable-languages=c,c++
--enable-libstdcxx-debug --disable-bootstrap --disable-multilib
--disable-libvtv --with-system-zlib --without-isl --enable-multiarch
Thread model: posix
Supported LTO compression algorithms: zlib
gcc version 11.0.1 20210321 (experimental) (GCC)

$ cat foo-types.ixx
module;

export module foo:types;
export class CDerived;

$ cat foo-test.ixx
module;
#include <iostream>
#include <typeinfo>

export module foo:test;
import :types;

export class Bar {
public:
    virtual ~Bar() = default;
    virtual void visit() {
        std::cout << "Bar::visit -> "<< typeid(*this).name() << std::endl;
    }
};

$ cat foo.ixx
module;

export module foo;

export import :types;
export import :test;

$ /opt/gcc-latest/bin/g++ -fmodules-ts -std=c++20 -x c++ -c foo-types.ixx -o
foo-types.o
$ /opt/gcc-latest/bin/g++ -fmodules-ts -std=c++20 -x c++ -c foo-test.ixx -o
foo-test.o
$ /opt/gcc-latest/bin/g++ -fmodules-ts -std=c++20 -x c++ -c foo.ixx -o foo.o
foo.ixx:3:8: internal compiler error: in tree_node, at cp/module.cc:9105
    3 | export module foo;
      |        ^~~~~~
0x8af602 trees_out::tree_node(tree_node*)
        ../../gcc/cp/module.cc:9105
0x8b0460 trees_out::core_vals(tree_node*)
        ../../gcc/cp/module.cc:5908
0x8b5009 trees_out::tree_node_vals(tree_node*)
        ../../gcc/cp/module.cc:7049
0x8b5009 trees_out::tree_value(tree_node*)
        ../../gcc/cp/module.cc:8936
0x8af522 trees_out::tree_node(tree_node*)
        ../../gcc/cp/module.cc:9134
0x8b0460 trees_out::core_vals(tree_node*)
        ../../gcc/cp/module.cc:5908
0x8b5009 trees_out::tree_node_vals(tree_node*)
        ../../gcc/cp/module.cc:7049
0x8b5009 trees_out::tree_value(tree_node*)
        ../../gcc/cp/module.cc:8936
0x8af522 trees_out::tree_node(tree_node*)
        ../../gcc/cp/module.cc:9134
0x8b0460 trees_out::core_vals(tree_node*)
        ../../gcc/cp/module.cc:5908
0x8b5009 trees_out::tree_node_vals(tree_node*)
        ../../gcc/cp/module.cc:7049
0x8b5009 trees_out::tree_value(tree_node*)
        ../../gcc/cp/module.cc:8936
0x8af522 trees_out::tree_node(tree_node*)
        ../../gcc/cp/module.cc:9134
0x8b0460 trees_out::core_vals(tree_node*)
        ../../gcc/cp/module.cc:5908
0x8b5009 trees_out::tree_node_vals(tree_node*)
        ../../gcc/cp/module.cc:7049
0x8b5009 trees_out::tree_value(tree_node*)
        ../../gcc/cp/module.cc:8936
0x8af522 trees_out::tree_node(tree_node*)
        ../../gcc/cp/module.cc:9134
0x8b0460 trees_out::core_vals(tree_node*)
        ../../gcc/cp/module.cc:5908
0x8b5009 trees_out::tree_node_vals(tree_node*)
        ../../gcc/cp/module.cc:7049
0x8b5009 trees_out::tree_value(tree_node*)
        ../../gcc/cp/module.cc:8936
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.

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

end of thread, other threads:[~2022-10-14 13:23 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-03-25 12:11 [Bug c++/99769] New: [modules] internal compiler error: in tree_node, at cp/module.cc:9105 when compile module partitions owt5008137 at live dot com
2021-03-30  1:29 ` [Bug c++/99769] " mpolacek at gcc dot gnu.org
2021-03-30  1:32 ` mpolacek at gcc dot gnu.org
2022-07-26 10:04 ` redi at gcc dot gnu.org
2022-10-09 11:11 ` tortoise_74 at yahoo dot co.uk
2022-10-14 13:22 ` 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).