public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c++/98327] New: C++ Module ICE on Linux
@ 2020-12-16 18:26 euloanty at live dot com
  2020-12-16 18:27 ` [Bug c++/98327] " euloanty at live dot com
                   ` (5 more replies)
  0 siblings, 6 replies; 7+ messages in thread
From: euloanty at live dot com @ 2020-12-16 18:26 UTC (permalink / raw)
  To: gcc-bugs

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

            Bug ID: 98327
           Summary: C++ Module ICE on Linux
           Product: gcc
           Version: 11.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: c++
          Assignee: unassigned at gcc dot gnu.org
          Reporter: euloanty at live dot com
  Target Milestone: ---

cqwrteur@Home-Server:~/wwwww/working$ g++ -o hello hello.cc -std=c++20
-fmodules-ts
hello.cc:4:8: internal compiler error: Segmentation fault
    4 | export module hello;
      |        ^~~~~~
0x10ab5cf crash_signal
        ../../gcc/gcc/toplev.c:327
0x9f8667 has_definition
        ../../gcc/gcc/cp/module.cc:11361
0xa0a867 depset::hash::make_dependency(tree_node*, depset::entity_kind)
        ../../gcc/gcc/cp/module.cc:12531
0xa0af44 depset::hash::add_dependency(tree_node*, depset::entity_kind)
        ../../gcc/gcc/cp/module.cc:12669
0xa11f9a trees_out::decl_node(tree_node*, walk_kind)
        ../../gcc/gcc/cp/module.cc:8569
0xa12702 trees_out::tree_node(tree_node*)
        ../../gcc/gcc/cp/module.cc:9132
0xa13131 trees_out::core_vals(tree_node*)
        ../../gcc/gcc/cp/module.cc:5990
0xa164d4 trees_out::tree_node_vals(tree_node*)
        ../../gcc/gcc/cp/module.cc:7124
0xa164d4 trees_out::tree_value(tree_node*)
        ../../gcc/gcc/cp/module.cc:8939
0xa12564 trees_out::tree_node(tree_node*)
        ../../gcc/gcc/cp/module.cc:9137
0xa13131 trees_out::core_vals(tree_node*)
        ../../gcc/gcc/cp/module.cc:5990
0xa164d4 trees_out::tree_node_vals(tree_node*)
        ../../gcc/gcc/cp/module.cc:7124
0xa164d4 trees_out::tree_value(tree_node*)
        ../../gcc/gcc/cp/module.cc:8939
0xa12564 trees_out::tree_node(tree_node*)
        ../../gcc/gcc/cp/module.cc:9137
0xa13131 trees_out::core_vals(tree_node*)
        ../../gcc/gcc/cp/module.cc:5990
0xa164d4 trees_out::tree_node_vals(tree_node*)
        ../../gcc/gcc/cp/module.cc:7124
0xa164d4 trees_out::tree_value(tree_node*)
        ../../gcc/gcc/cp/module.cc:8939
0xa12564 trees_out::tree_node(tree_node*)
        ../../gcc/gcc/cp/module.cc:9137
0xa13131 trees_out::core_vals(tree_node*)
        ../../gcc/gcc/cp/module.cc:5990
0xa164d4 trees_out::tree_node_vals(tree_node*)
        ../../gcc/gcc/cp/module.cc:7124
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.
cqwrteur@Home-Server:~/wwwww/working$

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

* [Bug c++/98327] C++ Module ICE on Linux
  2020-12-16 18:26 [Bug c++/98327] New: C++ Module ICE on Linux euloanty at live dot com
@ 2020-12-16 18:27 ` euloanty at live dot com
  2020-12-17 11:07 ` marxin at gcc dot gnu.org
                   ` (4 subsequent siblings)
  5 siblings, 0 replies; 7+ messages in thread
From: euloanty at live dot com @ 2020-12-16 18:27 UTC (permalink / raw)
  To: gcc-bugs

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

fdlbxtqi <euloanty at live dot com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |nathan at gcc dot gnu.org

--- Comment #1 from fdlbxtqi <euloanty at live dot com> ---
module;
#include <iostream>
#include <string_view>
export module hello;
export inline void greeter (std::string_view name) noexcept
{
  std::cout << "Hello " << name << "!\n";
}

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

* [Bug c++/98327] C++ Module ICE on Linux
  2020-12-16 18:26 [Bug c++/98327] New: C++ Module ICE on Linux euloanty at live dot com
  2020-12-16 18:27 ` [Bug c++/98327] " euloanty at live dot com
@ 2020-12-17 11:07 ` marxin at gcc dot gnu.org
  2021-01-04 19:33 ` nathan at gcc dot gnu.org
                   ` (3 subsequent siblings)
  5 siblings, 0 replies; 7+ messages in thread
From: marxin at gcc dot gnu.org @ 2020-12-17 11:07 UTC (permalink / raw)
  To: gcc-bugs

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

Martin Liška <marxin at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
   Last reconfirmed|                            |2020-12-17
                 CC|                            |marxin at gcc dot gnu.org
             Status|UNCONFIRMED                 |WAITING
     Ever confirmed|0                           |1

--- Comment #2 from Martin Liška <marxin at gcc dot gnu.org> ---
Can't reproduce with the current master:

$ g++ pr98327.cc -c -fmodules-ts -std=c++20
pr98327.cc:3:8: error: module-declaration not permitted here
    3 | export module hello;
      |        ^~~~~~
pr98327.cc:4:1: error: ‘export’ may only occur after a module interface
declaration
    4 | export inline void greeter (std::string_view name) noexcept
      | ^~~~~~

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

* [Bug c++/98327] C++ Module ICE on Linux
  2020-12-16 18:26 [Bug c++/98327] New: C++ Module ICE on Linux euloanty at live dot com
  2020-12-16 18:27 ` [Bug c++/98327] " euloanty at live dot com
  2020-12-17 11:07 ` marxin at gcc dot gnu.org
@ 2021-01-04 19:33 ` nathan at gcc dot gnu.org
  2021-01-04 20:26 ` nathan at gcc dot gnu.org
                   ` (2 subsequent siblings)
  5 siblings, 0 replies; 7+ messages in thread
From: nathan at gcc dot gnu.org @ 2021-01-04 19:33 UTC (permalink / raw)
  To: gcc-bugs

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

Nathan Sidwell <nathan at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|WAITING                     |ASSIGNED
           Assignee|unassigned at gcc dot gnu.org      |nathan at gcc dot gnu.org

--- Comment #3 from Nathan Sidwell <nathan at gcc dot gnu.org> ---
three things.
a) I think this is now fixed

b) it's not invalid code

c) Martin, I think you're falling foul of some of the requirements of where you
place code that is in the GMF (the bit between 'module;' and '[export] module
foo;'  But I think the diagnostic you're getting is not helping there.

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

* [Bug c++/98327] C++ Module ICE on Linux
  2020-12-16 18:26 [Bug c++/98327] New: C++ Module ICE on Linux euloanty at live dot com
                   ` (2 preceding siblings ...)
  2021-01-04 19:33 ` nathan at gcc dot gnu.org
@ 2021-01-04 20:26 ` nathan at gcc dot gnu.org
  2021-01-05 10:08 ` marxin at gcc dot gnu.org
  2021-01-05 13:31 ` nathan at gcc dot gnu.org
  5 siblings, 0 replies; 7+ messages in thread
From: nathan at gcc dot gnu.org @ 2021-01-04 20:26 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #4 from Nathan Sidwell <nathan at gcc dot gnu.org> ---
I cannot reproduce the reported crash -- like I said, I think this is fixed
(thanks for the backtrace).

I suspect Martin failed to copy the first line of the testcase 'module;' 
That's important -- it's not an English introduction of a piece of code :)

The error message could be improved to say where these decls are permitted,
rather than 'computer says no'.

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

* [Bug c++/98327] C++ Module ICE on Linux
  2020-12-16 18:26 [Bug c++/98327] New: C++ Module ICE on Linux euloanty at live dot com
                   ` (3 preceding siblings ...)
  2021-01-04 20:26 ` nathan at gcc dot gnu.org
@ 2021-01-05 10:08 ` marxin at gcc dot gnu.org
  2021-01-05 13:31 ` nathan at gcc dot gnu.org
  5 siblings, 0 replies; 7+ messages in thread
From: marxin at gcc dot gnu.org @ 2021-01-05 10:08 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #5 from Martin Liška <marxin at gcc dot gnu.org> ---
> I suspect Martin failed to copy the first line of the testcase 'module;' 
> That's important -- it's not an English introduction of a piece of code :)
> 

Yep, I failed to do that :)

Anyway, now I can bisect that it was fixed with r11-6309-g8be20b9e0d6d53d8.

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

* [Bug c++/98327] C++ Module ICE on Linux
  2020-12-16 18:26 [Bug c++/98327] New: C++ Module ICE on Linux euloanty at live dot com
                   ` (4 preceding siblings ...)
  2021-01-05 10:08 ` marxin at gcc dot gnu.org
@ 2021-01-05 13:31 ` nathan at gcc dot gnu.org
  5 siblings, 0 replies; 7+ messages in thread
From: nathan at gcc dot gnu.org @ 2021-01-05 13:31 UTC (permalink / raw)
  To: gcc-bugs

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

Nathan Sidwell <nathan at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
           Keywords|ice-on-invalid-code         |ice-on-valid-code
             Status|ASSIGNED                    |RESOLVED
         Resolution|---                         |FIXED

--- Comment #6 from Nathan Sidwell <nathan at gcc dot gnu.org> ---
Diagnostic adjusted
 6ffaffd5d10 2021-01-05 | [c++]: Improve module-decl diagnostics [PR 98327]

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

end of thread, other threads:[~2021-01-05 13:31 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-12-16 18:26 [Bug c++/98327] New: C++ Module ICE on Linux euloanty at live dot com
2020-12-16 18:27 ` [Bug c++/98327] " euloanty at live dot com
2020-12-17 11:07 ` marxin at gcc dot gnu.org
2021-01-04 19:33 ` nathan at gcc dot gnu.org
2021-01-04 20:26 ` nathan at gcc dot gnu.org
2021-01-05 10:08 ` marxin at gcc dot gnu.org
2021-01-05 13:31 ` nathan 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).