aboutsummaryrefslogtreecommitdiff
path: root/gcc/testsuite/g++.dg/cpp2a/constinit18.C
blob: 51b4f0273be9385430a267c16692fb48c22bedc5 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
// PR c++/104066
// { dg-do compile { target c++20 } }

constinit void (*p)() = nullptr;
constinit void (*pp)() = nullptr;
void fn();
constinit void (&r)() = fn;

extern constinit long (* const syscall_reexported) (long, ...);

constinit void bad (); // { dg-error ".constinit. on function return type is not allowed" }
constinit void bad () { } // { dg-error ".constinit. on function return type is not allowed" }