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

            Bug ID: 98386
           Summary: C++20 module: file exists failure and success happen
                    alternatively for windows.
           Product: gcc
           Version: 11.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: c++
          Assignee: unassigned at gcc dot gnu.org
          Reporter: unlvsur at live dot com
  Target Milestone: ---

D:\Desktop\module>g++ -c main.cc -Ofast -std=c++20 -s -flto -fmodules-ts
-march=native

D:\Desktop\module>g++ -c hello.cc -Ofast -std=c++20 -s -flto -fmodules-ts
-march=native
hello.cc:4:8: error: failed to write compiled module: File exists
    4 | export module hello;
      |        ^~~~~~
hello.cc:4:8: note: compiled module file is 'gcm.cache/hello.gcm'

D:\Desktop\module>g++ -c hello.cc -Ofast -std=c++20 -s -flto -fmodules-ts
-march=native

D:\Desktop\module>g++ -c hello.cc -Ofast -std=c++20 -s -flto -fmodules-ts
-march=native
hello.cc:4:8: error: failed to write compiled module: File exists
    4 | export module hello;
      |        ^~~~~~
hello.cc:4:8: note: compiled module file is 'gcm.cache/hello.gcm'

D:\Desktop\module>g++ -c hello.cc -Ofast -std=c++20 -s -flto -fmodules-ts
-march=native

D:\Desktop\module>g++ -c hello.cc -Ofast -std=c++20 -s -flto -fmodules-ts
-march=native
hello.cc:4:8: error: failed to write compiled module: File exists
    4 | export module hello;
      |        ^~~~~~
hello.cc:4:8: note: compiled module file is 'gcm.cache/hello.gcm'


You have a succ-error-succ-error loop. It must be something bugged here.

Reply via email to