public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
From: "yagreg7 at gmail dot com" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug c++/108080] ICE: in core_vals, at cp/module.cc:6262 with -fmodule-header
Date: Mon, 14 Aug 2023 11:15:39 +0000	[thread overview]
Message-ID: <bug-108080-4-s1KeyRuuG0@http.gcc.gnu.org/bugzilla/> (raw)
In-Reply-To: <bug-108080-4@http.gcc.gnu.org/bugzilla/>

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

Gregory Dushkin <yagreg7 at gmail dot com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |yagreg7 at gmail dot com

--- Comment #5 from Gregory Dushkin <yagreg7 at gmail dot com> ---
I have a similar issue with GCC 13.2.1. The weird part about it is that it
seems to depend on the exact value of some compiler flags rather than the
actual source file content. I'm trying to use g++ to compile {fmt} as a module
and this is what I get:

When building with CMake the {fmt} itself (go to repository, `mkdir build; cd
build; cmake .. -DFMT_MODULE=ON && make`, the command
```
/usr/bin/c++ 
-I/home/greg/.cpm/fmt/c85658eda638008e7e9290fcd31836ed9f7be1a4/include -O3
-DNDEBUG -std=gnu++20 -fvisibility=hidden -fvisibility-inlines-hidden
-fmodules-ts -MD -MT CMakeFiles/fmt.dir/src/fmt.cc.o -MF
CMakeFiles/fmt.dir/src/fmt.cc.o.d -o CMakeFiles/fmt.dir/src/fmt.cc.o -c
/home/greg/.cpm/fmt/c85658eda638008e7e9290fcd31836ed9f7be1a4/src/fmt.cc

```
executes successfully and the compilation is OK.

However, when compiling {fmt} as a CMake subproject, the command is a little
different:
```
cd /home/greg/projects/cpp/4seudo/build/_deps/fmt-build && /usr/bin/c++ 
-I/home/greg/.cpm/fmt/c85658eda638008e7e9290fcd31836ed9f7be1a4/include
-std=c++20 -fmodules-ts -MD -MT _deps/fmt-build/CMakeFiles/fmt.dir/src/fmt.cc.o
-MF CMakeFiles/fmt.dir/src/fmt.cc.o.d -o CMakeFiles/fmt.dir/src/fmt.cc.o -c
/home/greg/.cpm/fmt/c85658eda638008e7e9290fcd31836ed9f7be1a4/src/fmt.cc
```

And _this_ command fails with an ICE:
```
$ cd /home/greg/projects/cpp/4seudo/build/_deps/fmt-build && /usr/bin/c++ 
-I/home/greg/.cpm/fmt/c85658eda638008e7e9290fcd31836ed9f7be1a4/include
-std=c++20 -fmodules-ts -MD -MT _deps/fmt-build/CMakeFiles/fmt.dir/src/fmt.cc.o
-MF CMakeFiles/fmt.dir/src/fmt.cc.o.d -o CMakeFiles/fmt.dir/src/fmt.cc.o -c
/home/greg/.cpm/fmt/c85658eda638008e7e9290fcd31836ed9f7be1a4/src/fmt.cc
-freport-bug

/home/greg/.cpm/fmt/c85658eda638008e7e9290fcd31836ed9f7be1a4/src/fmt.cc:73:8:
internal compiler error: in core_vals, at cp/module.cc:6262
   73 | export module fmt;
      |        ^~~~~~
0x1ad33c8 internal_error(char const*, ...)
        ???:0
0x6b7b63 fancy_abort(char const*, int, char const*)
        ???:0
0x7c98b7 trees_out::tree_value(tree_node*)
        ???:0
0x7c763d trees_out::tree_node(tree_node*)
        ???:0
0x7c8806 trees_out::core_vals(tree_node*)
        ???:0
0x7c8d64 trees_out::tree_node_vals(tree_node*)
        ???:0
0x7c616b trees_out::decl_value(tree_node*, depset*)
        ???:0
0x7cb47f depset::hash::find_dependencies(module_state*)
        ???:0
0x7cc422 module_state::write_begin(elf_out*, cpp_reader*, module_state_config&,
unsigned int&)
        ???:0
0x7dc105 finish_module_processing(cpp_reader*)
        ???:0
0x7714fd c_parse_final_cleanups()
        ???:0
0x9444b4 c_common_parse_file()
        ???:0
Please submit a full bug report, with preprocessed source.
Please include the complete backtrace with any bug report.
See <https://bugs.archlinux.org/> for instructions.
Preprocessed source stored into /tmp/ccoSmHEM.out file, please attach this to
your bugreport.
```

Maybe there is an error in arguments parsing?

I will be attaching ccoSmHEM.out to this issue now.

  parent reply	other threads:[~2023-08-14 11:15 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-12-13  6:51 [Bug c++/108080] New: " zsojka at seznam dot cz
2022-12-13  6:53 ` [Bug c++/108080] " pinskia at gcc dot gnu.org
2022-12-13  6:53 ` pinskia at gcc dot gnu.org
2023-07-26 13:37 ` doko at gcc dot gnu.org
2023-07-26 13:39 ` doko at gcc dot gnu.org
2023-08-14 11:15 ` yagreg7 at gmail dot com [this message]
2023-08-14 11:21 ` yagreg7 at gmail dot com
2023-08-14 11:58 ` yagreg7 at gmail dot com
2024-03-06 21:32 ` ppalka at gcc dot gnu.org
2024-03-06 21:33 ` ppalka at gcc dot gnu.org
2024-03-06 21:35 ` ppalka at gcc dot gnu.org

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=bug-108080-4-s1KeyRuuG0@http.gcc.gnu.org/bugzilla/ \
    --to=gcc-bugzilla@gcc.gnu.org \
    --cc=gcc-bugs@gcc.gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).