mirror of
https://forge.sourceware.org/marek/gcc.git
synced 2026-02-22 20:01:31 -05:00
* decl.c (check_for_uninitialized_const_var): Check is_instantiation_of_constexpr. * constexpr.c (ensure_literal_type_for_constexpr_object): Check is_instantiation_of_constexpr. (potential_constant_expression_1): Check var_in_maybe_constexpr_fn. From-SVN: r251429
17 lines
192 B
C
17 lines
192 B
C
// PR c++/80642
|
|
// { dg-do compile { target c++14 } }
|
|
|
|
int main()
|
|
{
|
|
[](auto i)
|
|
{
|
|
if (i)
|
|
{
|
|
int j;
|
|
static int k;
|
|
return i + j;
|
|
}
|
|
return i;
|
|
}(0);
|
|
}
|