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
  • [Bug c++/107192] New: [modules... tortoise_74 at yahoo dot co.uk via Gcc-bugs

Reply via email to