diff --git a/SingleSource/Regression/C++/custom_section_members.cpp b/SingleSource/Regression/C++/custom_section_members.cpp new file mode 100644 --- /dev/null +++ b/SingleSource/Regression/C++/custom_section_members.cpp @@ -0,0 +1,14 @@ +// Test that we can compile a simple class with members in a custom section. + +struct A { + static int foo() __attribute__((section("section"))); + static void bar() __attribute__((section("section"))); +}; + +int A::foo() { return 0; } +void A::bar() {} + +int main() { + A::bar(); + return A::foo(); +} diff --git a/SingleSource/Regression/C++/custom_section_members.reference_output b/SingleSource/Regression/C++/custom_section_members.reference_output new file mode 100644 --- /dev/null +++ b/SingleSource/Regression/C++/custom_section_members.reference_output @@ -0,0 +1 @@ +exit 0