diff options
Diffstat (limited to 'config.tests/no_direct_extern_access/main.cpp')
-rw-r--r-- | config.tests/no_direct_extern_access/main.cpp | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/config.tests/no_direct_extern_access/main.cpp b/config.tests/no_direct_extern_access/main.cpp new file mode 100644 index 0000000000..541c8b4b33 --- /dev/null +++ b/config.tests/no_direct_extern_access/main.cpp @@ -0,0 +1,20 @@ +// Copyright (C) 2022 Intel Corporation. +// SPDX-License-Identifier: MIT + +// This is combining the tests found in: +// https://sourceware.org/bugzilla/show_bug.cgi?id=29087 +// https://sourceware.org/bugzilla/show_bug.cgi?id=29377 + +#include "lib.h" + +extern void foo(); // other.cpp +void (*get_foo())() +{ + return foo; +} + +struct Local : S { }; +int main() +{ + Local l; +} |