public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c++/107192] New: [modules] internal compiler error: Segmentation fault parsing line "module :Bar;"
@ 2022-10-09 11:34 tortoise_74 at yahoo dot co.uk
2022-10-09 15:25 ` [Bug c++/107192] " tortoise_74 at yahoo dot co.uk
2024-02-11 13:28 ` nshead at gcc dot gnu.org
0 siblings, 2 replies; 3+ messages in thread
From: tortoise_74 at yahoo dot co.uk @ 2022-10-09 11:34 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=107192
Bug ID: 107192
Summary: [modules] internal compiler error: Segmentation fault
parsing line "module :Bar;"
Product: gcc
Version: 11.2.0
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: c++
Assignee: unassigned at gcc dot gnu.org
Reporter: tortoise_74 at yahoo dot co.uk
Target Milestone: ---
Created attachment 53682
--> https://gcc.gnu.org/bugzilla/attachment.cgi?id=53682&action=edit
Sample code to reproduce segfault
Found while trying to create a reproducer for
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=107191
When attempting to compile the following code:
```
module;
module :Bar;
```
I got:
```
[ 25%] Building CXX object CMakeFiles/gccice.dir/Bar.cpp.o
/usr/bin/c++ -fmodules-ts -std=gnu++20 -MD -MT
CMakeFiles/gccice.dir/Bar.cpp.o -MF CMakeFiles/gccice.dir/Bar.cpp.o.d -o
CMakeFiles/gccice.dir/Bar.cpp.o -c /home/brucea/projects/jobs/gccice2/Bar.cpp
/home/brucea/projects/jobs/gccice2/Bar.cpp:8:9: internal compiler error:
Segmentation fault
8 | module :Bar;
| ^~~
0x7f02a38e151f ???
./signal/../sysdeps/unix/sysv/linux/x86_64/libc_sigaction.c:0
0x7f02a38c8d8f __libc_start_call_main
../sysdeps/nptl/libc_start_call_main.h:58
0x7f02a38c8e3f __libc_start_main_impl
../csu/libc-start.c:392
Please submit a full bug report,
with preprocessed source if appropriate.
```
This may or may not be legal code but a segfault is incorrect.
>gcc --version
gcc (Ubuntu 11.2.0-19ubuntu1) 11.2.0
^ permalink raw reply [flat|nested] 3+ messages in thread
* [Bug c++/107192] [modules] internal compiler error: Segmentation fault parsing line "module :Bar;"
2022-10-09 11:34 [Bug c++/107192] New: [modules] internal compiler error: Segmentation fault parsing line "module :Bar;" tortoise_74 at yahoo dot co.uk
@ 2022-10-09 15:25 ` tortoise_74 at yahoo dot co.uk
2024-02-11 13:28 ` nshead at gcc dot gnu.org
1 sibling, 0 replies; 3+ messages in thread
From: tortoise_74 at yahoo dot co.uk @ 2022-10-09 15:25 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=107192
--- Comment #1 from Bruce Adams <tortoise_74 at yahoo dot co.uk> ---
Still occurs if I use gcc 12.1
>g++-12 --version
g++-12 (Ubuntu 12.1.0-2ubuntu1~22.04) 12.1.0
```
[ 50%] Building CXX object CMakeFiles/gccice.dir/Bar.cpp.o
/usr/bin/g++-12 -fmodules-ts -std=gnu++20 -MD -MT
CMakeFiles/gccice.dir/Bar.cpp.o -MF CMakeFiles/gccice.dir/Bar.cpp.o.d -o
CMakeFiles/gccice.dir/Bar.cpp.o -c /home/brucea/projects/jobs/gccice2/Bar.cpp
/home/brucea/projects/jobs/gccice2/Bar.cpp:8:9: internal compiler error:
Segmentation fault
8 | module :Bar;
| ^~~
0xd910e3 crash_signal
../../src/gcc/toplev.cc:322
0x7f5f531b851f ???
./signal/../sysdeps/unix/sysv/linux/x86_64/libc_sigaction.c:0
0x783313 module_state::is_partition() const
../../src/gcc/cp/module.cc:3482
0x783313 get_module(tree_node*, module_state*, bool)
../../src/gcc/cp/module.cc:13782
0x7b3a91 cp_parser_module_name
../../src/gcc/cp/parser.cc:14522
0x7da1e2 cp_parser_module_declaration
../../src/gcc/cp/parser.cc:14595
0x7fa3d3 cp_parser_translation_unit
../../src/gcc/cp/parser.cc:4968
0x7fa3d3 c_parse_file()
../../src/gcc/cp/parser.cc:48068
0x8e6335 c_common_parse_file()
../../src/gcc/c-family/c-opts.cc:1240
```
^ permalink raw reply [flat|nested] 3+ messages in thread
* [Bug c++/107192] [modules] internal compiler error: Segmentation fault parsing line "module :Bar;"
2022-10-09 11:34 [Bug c++/107192] New: [modules] internal compiler error: Segmentation fault parsing line "module :Bar;" tortoise_74 at yahoo dot co.uk
2022-10-09 15:25 ` [Bug c++/107192] " tortoise_74 at yahoo dot co.uk
@ 2024-02-11 13:28 ` nshead at gcc dot gnu.org
1 sibling, 0 replies; 3+ messages in thread
From: nshead at gcc dot gnu.org @ 2024-02-11 13:28 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=107192
Nathaniel Shead <nshead at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Keywords|ice-on-valid-code |ice-on-invalid-code
Assignee|unassigned at gcc dot gnu.org |nshead at gcc dot gnu.org
CC| |nshead at gcc dot gnu.org
Status|UNCONFIRMED |RESOLVED
See Also| |https://gcc.gnu.org/bugzill
| |a/show_bug.cgi?id=110808
Target Milestone|--- |14.0
Resolution|--- |FIXED
--- Comment #2 from Nathaniel Shead <nshead at gcc dot gnu.org> ---
Fixed on trunk with r14-6977-g7f24446a3cf67d.
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2024-02-11 13:29 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-10-09 11:34 [Bug c++/107192] New: [modules] internal compiler error: Segmentation fault parsing line "module :Bar;" tortoise_74 at yahoo dot co.uk
2022-10-09 15:25 ` [Bug c++/107192] " tortoise_74 at yahoo dot co.uk
2024-02-11 13:28 ` nshead 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).