The problem here is the test function is now being
inlined into main but that was not expected.
So mark the test functions with noinline and noclone
fixes the issue.

Pushed as obvious after testing to make sure the
test_frame_*.c testcases now work.

gcc/testsuite/ChangeLog:

        * gcc.target/aarch64/test_frame_common.h (t_frame_pattern):
        Add noclone and noinline to the defining test function.

Signed-off-by: Andrew Pinski <[email protected]>
---
 gcc/testsuite/gcc.target/aarch64/test_frame_common.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/gcc/testsuite/gcc.target/aarch64/test_frame_common.h 
b/gcc/testsuite/gcc.target/aarch64/test_frame_common.h
index c63fbcedd79..c097d964864 100644
--- a/gcc/testsuite/gcc.target/aarch64/test_frame_common.h
+++ b/gcc/testsuite/gcc.target/aarch64/test_frame_common.h
@@ -51,7 +51,7 @@ initialize_array (unsigned char *a, int len)
 }
 
 #define t_frame_pattern(name, local_size, callee_saved)\
-int \
+int __attribute__ ((noinline, noclone)) \
 name (void)\
 {\
   unsigned char a[local_size];\
-- 
2.43.0

Reply via email to