This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug c++/83897] New: [8 Regression] Useless __builtin_unreachable () emitted by the C++ FE


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

            Bug ID: 83897
           Summary: [8 Regression] Useless __builtin_unreachable ()
                    emitted by the C++ FE
           Product: gcc
           Version: 7.2.1
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: c++
          Assignee: unassigned at gcc dot gnu.org
          Reporter: jakub at gcc dot gnu.org
  Target Milestone: ---

For:

struct A {};
struct B { int a; int b = 5; };

A
bar (B)
{
  return {};
}

we emit __builtin_unreachable and later on need to optimize it away as
unreachable.  With lots of such small functions it can be quite measurable.

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]