Bug 78083 - wrong mangling for varargs lambdas
Summary: wrong mangling for varargs lambdas
Status: UNCONFIRMED
Alias: None
Product: gcc
Classification: Unclassified
Component: c++ (show other bugs)
Version: unknown
: P3 normal
Target Milestone: ---
Assignee: Not yet assigned to anyone
URL:
Keywords: ABI, c++-lambda, wrong-code
Depends on:
Blocks: lambdas
  Show dependency treegraph
 
Reported: 2016-10-23 05:02 UTC by Richard Smith
Modified: 2022-03-11 00:32 UTC (History)
2 users (show)

See Also:
Host:
Target:
Build:
Known to work:
Known to fail:
Last reconfirmed:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Richard Smith 2016-10-23 05:02:22 UTC
Testcase:

inline int f() {
  auto a = [](...) { static int n; return ++n; };
  auto b = []() { static int n; return ++n; };
  return a() + b();
}
int k = f();

The lambdas should have closure-type-names of UlzE_ and UlvE_ in their manglings respectively, but GCC mangles the second one incorrectly as UlvE0_. EDG and (as of a few minutes ago) Clang get this right.