https://gcc.gnu.org/bugzilla/show_bug.cgi?id=118673
--- Comment #6 from Andrew Pinski <pinskia at gcc dot gnu.org> ---
the main issue can be shown by (still need includes for SmallVector/ArrayRef):
```
enum class Extension : unsigned {
SPV_KHR_integer_dot_product = 17
};
[[gnu::noinline]]
llvm::SmallVector<llvm::ArrayRef<Extension>, 1>
getIntegerDotProductExtensions() {
static const auto extension = Extension::SPV_KHR_integer_dot_product;
return {extension};
}
int main()
{
auto t = getIntegerDotProductExtensions();
__builtin_printf("size = %d\n", t.size());
__builtin_printf("capacity = %d\n", t.capacity());
__builtin_printf("size = %d\n", t[0].size());
if (t[0][0] != Extension::SPV_KHR_integer_dot_product)
__builtin_abort();
}
```
I am still trying to just get to that but so far it looks like a temporary
leaves scope and that messes up things. But I could be wrong about a temporary
being not there.