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

--- Comment #3 from Avi Kivity <avi at scylladb dot com> ---
I have something like this:

│     2680  future<> system_keyspace_make(distributed<replica::database>&
dist_db, distributed<service::storage_service>& dist_ss,
sharded<gms::gossiper>& dist_gossiper, db::config& cfg) {               │
│     2681      register_virtual_tables(dist_db, dist_ss, dist_gossiper, cfg);  
...
                                                                               
                                        │
│     2687      for (auto&& table : system_keyspace::all_tables(db_config)) {   

...

│     2695              co_await db.create_keyspace(ksm,
dist_ss.local().get_erm_factory(), true,
replica::database::system_keyspace::yes);   


And I see a crash as if the std::vector returned by all_tables() is not
persisted. This worked in previous gcc versions and works in clang.

I don't now what the standard says, but it really should persist temporaries in
range for that contains a suspension point, or a lot of buggy code will be
written.

Reply via email to