https://gcc.gnu.org/bugzilla/show_bug.cgi?id=98417
Rémi Galan Alfonso changed:
What|Removed |Added
CC||remi.galanalfonso at gmail dot
com
--- Comment #2 from Rémi Galan Alfonso ---
Hello,
I'm unable to reproduce it on any released gcc-11 or on trunk (but can with a
gcc from 2020-12-20).
Reduction gives me for hello.cc:
module;
# 1 "" 1
namespace std {
template
struct char_traits;
}
typedef struct {} mbstate_t;
namespace std {
template<>
struct char_traits {
mbstate_t state_type;
};
template>
class basic_string_view {
public: basic_string_view(const _CharT* ){};
};
using string_view = basic_string_view;
}
# 3 "" 2
export module hello;
export void greeter(std::string_view){}
If we accept invalid test case this and main.cc can be further reduced into:
- hello.cc
module;
# 1 "" 1
template struct char_traits;
typedef struct {
} __mbstate_t;
template <> struct char_traits { __mbstate_t state_type; };
template >
class basic_string_view;
using string_view = basic_string_view;
# 3 "" 2
export module hello;
void greeter(string_view);
- main.cc
import hello;
greeter
Bisection points me to the following commit as the one fixing the bug:
commit 47145e6916f58e1cd4f562c06fa7289da49f690c
Author: Nathan Sidwell
Date: Tue Feb 23 07:08:55 2021 -0800
c++: typedef for linkage [PR 99208]
As this is the first time I use cvise, you probably want to double check those
informations.