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

* [Bug c++/99769] [modules] internal compiler error: in tree_node, at cp/module.cc:9105 when compile module partitions
  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 ` mpolacek at gcc dot gnu.org
  2021-03-30  1:32 ` mpolacek at gcc dot gnu.org
                   ` (3 subsequent siblings)
  4 siblings, 0 replies; 6+ messages in thread
From: mpolacek at gcc dot gnu.org @ 2021-03-30  1:29 UTC (permalink / raw)
  To: gcc-bugs

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

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

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |NEW
   Last reconfirmed|                            |2021-03-30
     Ever confirmed|0                           |1
                 CC|                            |mpolacek at gcc dot gnu.org

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

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

* [Bug c++/99769] [modules] internal compiler error: in tree_node, at cp/module.cc:9105 when compile module partitions
  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
                   ` (2 subsequent siblings)
  4 siblings, 0 replies; 6+ messages in thread
From: mpolacek at gcc dot gnu.org @ 2021-03-30  1:32 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #2 from Marek Polacek <mpolacek at gcc dot gnu.org> ---
We have __dynamic_cast without DECL_CONTEXT and so ICE in

 9050       if (!DECL_CONTEXT (t))
 9051         {
 9052           /* There are a few cases of decls with no context.  We'll write
 9053              these by value, but first assert they are cases we expect. 
*/
 9054           gcc_checking_assert (ref == WK_normal);
 9055           switch (TREE_CODE (t))
 9056             {
 9057             default: gcc_unreachable ();

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

* [Bug c++/99769] [modules] internal compiler error: in tree_node, at cp/module.cc:9105 when compile module partitions
  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
  4 siblings, 0 replies; 6+ messages in thread
From: redi at gcc dot gnu.org @ 2022-07-26 10:04 UTC (permalink / raw)
  To: gcc-bugs

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

Jonathan Wakely <redi at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
   Last reconfirmed|2021-03-30 00:00:00         |2022-7-26
           Keywords|                            |ice-on-valid-code

--- Comment #3 from Jonathan Wakely <redi at gcc dot gnu.org> ---
PR 106304 has a much simpler single-file reproducer that ICEs at the same line.

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

* [Bug c++/99769] [modules] internal compiler error: in tree_node, at cp/module.cc:9105 when compile module partitions
  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
                   ` (2 preceding siblings ...)
  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
  4 siblings, 0 replies; 6+ messages in thread
From: tortoise_74 at yahoo dot co.uk @ 2022-10-09 11:11 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #4 from Bruce Adams <tortoise_74 at yahoo dot co.uk> ---
I had a issue I believed to be related but in attempting to create a reproducer
got several different ICEs so I have submitted a separate ticket - see
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=107191

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

* [Bug c++/99769] [modules] internal compiler error: in tree_node, at cp/module.cc:9105 when compile module partitions
  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
                   ` (3 preceding siblings ...)
  2022-10-09 11:11 ` tortoise_74 at yahoo dot co.uk
@ 2022-10-14 13:22 ` ppalka at gcc dot gnu.org
  4 siblings, 0 replies; 6+ messages in thread
From: ppalka at gcc dot gnu.org @ 2022-10-14 13:22 UTC (permalink / raw)
  To: gcc-bugs

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

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

           What    |Removed                     |Added
----------------------------------------------------------------------------
           See Also|https://gcc.gnu.org/bugzill |
                   |a/show_bug.cgi?id=106304    |
         Resolution|---                         |DUPLICATE
             Status|NEW                         |RESOLVED
                 CC|                            |ppalka at gcc dot gnu.org

--- Comment #5 from Patrick Palka <ppalka at gcc dot gnu.org> ---
Same issue as the recently fixed PR106304

*** This bug has been marked as a duplicate of bug 106304 ***

^ 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).