Debian Codegraph @

gcc/testsuite/g++.dg/ext/consteval1.C

raw
1 // { dg-do compile }
2 // { dg-options "-std=c++2a" }
3
4 consteval int foo (int x) { return x; }
5 int d = 6; // { dg-bogus "'int d' is not const" }
6 bool e = __builtin_has_attribute (foo (d), packed); // { dg-bogus "the value of 'd' is not usable in a constant expression" }