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

Johel Ernesto Guerrero Peña <johelegp at gmail dot com> changed:

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

--- Comment #5 from Johel Ernesto Guerrero Peña <johelegp at gmail dot com> ---
I get the same error in this case in debug mode:
https://godbolt.org/z/zEGTcMhbh.

mod.cpp:
```C++
export module mod;
export inline void f() {}
```

test.cpp:
```C++
import mod;
// using ::f; // Workaround GCC bug 99377.
template <class> void g() { f(); }
int main() { g<int>(); }
```

Commands:
```
g++ -pedantic -Wall -Wextra -Wconversion -g -fmodules-ts -std=c++23 -c mod.cpp 
g++ -pedantic -Wall -Wextra -Wconversion -g -fmodules-ts -std=c++23 -c test.cpp 
g++ -pedantic -Wall -Wextra -Wconversion -g -fmodules-ts -std=c++23 *.o
```

Output:
```
/usr/bin/ld: test.o: in function `void g<int>()':
/home/johel/tmp/bug/test.cpp:3: undefined reference to `f()'
collect2: error: ld returned 1 exit status
```

Reply via email to