public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c++/105446] New: [modules] Partitions: Segfault
@ 2022-05-01 7:45 deco33000 at yandex dot com
2022-05-01 10:17 ` [Bug c++/105446] " deco33000 at yandex dot com
2022-05-06 13:00 ` deco33000 at yandex dot com
0 siblings, 2 replies; 3+ messages in thread
From: deco33000 at yandex dot com @ 2022-05-01 7:45 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=105446
Bug ID: 105446
Summary: [modules] Partitions: Segfault
Product: gcc
Version: 12.0
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: c++
Assignee: unassigned at gcc dot gnu.org
Reporter: deco33000 at yandex dot com
Target Milestone: ---
Hi,
I have a segfault at runtime with no compilation issue, even without calling
the function in the partition:
-----------
mod.cxx:
module;
#include <iostream>
#include <string_view>
#include <string>
export module hello;
export import :sub_mod;
namespace X {
inline unsigned gv = 52;
void greeter2 ( std::string_view const &name ){
std::string h = "non exported greeter";
std::cout << "Bye" << name << "!" << h << "\n";
// Y::g();
}
}
export {
namespace X {
void greeter ( std::string_view const &name ){
std::string h = "exported greeter";
std::cout << "Hello " << name << "!" << h << "\n";
greeter2("greet2");
}
}
}
-----------
mod_sub.cxx:
module;
#include <iostream>
export module hello:sub_mod;
namespace Y {
auto g (){
std::cout << "in out" << std::endl;
}
}
-----------
main.cpp
import hello;
int main ( void ){
X::greeter( "world" );
return 0;
}
-----------
compilation:
/path/custom/g++ g++ -std=gnu++20 -fmodules-ts mod_sub.cxx mod.cxx main.cpp
Result: Segfault at runtime.
Thanks,
^ permalink raw reply [flat|nested] 3+ messages in thread
* [Bug c++/105446] [modules] Partitions: Segfault
2022-05-01 7:45 [Bug c++/105446] New: [modules] Partitions: Segfault deco33000 at yandex dot com
@ 2022-05-01 10:17 ` deco33000 at yandex dot com
2022-05-06 13:00 ` deco33000 at yandex dot com
1 sibling, 0 replies; 3+ messages in thread
From: deco33000 at yandex dot com @ 2022-05-01 10:17 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=105446
--- Comment #1 from KL <deco33000 at yandex dot com> ---
gcc-12.1.0-RC-20220429
^ permalink raw reply [flat|nested] 3+ messages in thread
* [Bug c++/105446] [modules] Partitions: Segfault
2022-05-01 7:45 [Bug c++/105446] New: [modules] Partitions: Segfault deco33000 at yandex dot com
2022-05-01 10:17 ` [Bug c++/105446] " deco33000 at yandex dot com
@ 2022-05-06 13:00 ` deco33000 at yandex dot com
1 sibling, 0 replies; 3+ messages in thread
From: deco33000 at yandex dot com @ 2022-05-06 13:00 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=105446
KL <deco33000 at yandex dot com> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|UNCONFIRMED |RESOLVED
Resolution|--- |INVALID
--- Comment #2 from KL <deco33000 at yandex dot com> ---
I am stepping back, tried today, worked as expected.
I don't know what happened.
Sorry for the noise
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2022-05-06 13:00 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-05-01 7:45 [Bug c++/105446] New: [modules] Partitions: Segfault deco33000 at yandex dot com
2022-05-01 10:17 ` [Bug c++/105446] " deco33000 at yandex dot com
2022-05-06 13:00 ` deco33000 at yandex dot com
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).