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

Nathaniel Shead <nshead at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |ASSIGNED
   Last reconfirmed|                            |2024-11-04
                 CC|                            |nshead at gcc dot gnu.org
           Assignee|unassigned at gcc dot gnu.org      |nshead at gcc dot 
gnu.org
     Ever confirmed|0                           |1

--- Comment #1 from Nathaniel Shead <nshead at gcc dot gnu.org> ---
Confirmed, I came across this (checking-only) error again while looking at the
github linked in PR103701 to see if the noted issue still happened.

Note that this testcase isn't sufficient to reproduce, as it's missing the
preprocessed files for the imported module units.  But here is an example
testcase:

  // getvarsfromfile.cxx
  module;
  #include <fstream>
  #include <vector>
  export module Hajime:Getvarsfromfile;
  using std::string;
  using std::vector;
  export vector<string> getVarsFromFile(string filename);

  // installer.cxx
  module;
  #include <memory>
  export module Hajime:Installer;
  using std::string;

  // languages.cxx
  module;
  #include <vector>
  #include <string>
  export module Hajime:Languages;

  // output.cxx
  module;
  #include <thread>
  #include <memory>
  export module Hajime:Output;

  // server.cxx
  module;
  #include <chrono>
  export module Hajime:Server;

  // wizard.cxx
  module;
  #include <string>
  export module Hajime:Wizard;
  using std::string;
  export void initialHajimeSetup(string confFile, string serversFile, string
serverFile, string sysdService);

  // hajime.cpp
  module;
  #include <thread>
  #include <cstring>
  #include <vector>
  #include <filesystem>
  export module Hajime;
  export import :Output;
  export import :Languages;
  export import :Installer;
  export import :Server;
  export import :Getvarsfromfile;
  export import :Wizard;

Compile with "g++-15 -std=c++20 -fmodules-ts -S getvarsfromfile.cxx
languages.cxx output.cxx server.cxx wizard.cxx installer.cxx hajime.cpp".  It's
difficult to reduce further as the ICE relies on having exhausted all available
location_t values first.

That said, I think I've found a fix; I'll post it once full bootstrap+regtest
completes.

Reply via email to