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

            Bug ID: 89816
           Summary: [9 Regression] std::variant move construction
                    regressed since GCC 8.3
           Product: gcc
           Version: 9.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: libstdc++
          Assignee: unassigned at gcc dot gnu.org
          Reporter: antoshkka at gmail dot com
  Target Milestone: ---

The following code


#include <variant>

struct my_type{
    my_type(my_type&&) noexcept;
};

using V1 = std::variant<int, float, long, double, my_type>;
V1 test1(V1 v ) { return v; }


Was producing a jump table of size 5 on GCC 8.3. GCC 9 produces huge jump
tables with over 30 entries. This leads to 3 times bigger binaries with GCC 9.
https://godbolt.org/z/SUWL5T

Reply via email to