With improvements (not actually implemented yet but shows up with LLVM),
the call in pr17377.c to prevent a tail call does not work. So
to make it more robust, we need to mark the variable x as being volatile.

Pushed as obvious after testing on x86_64-linux-gnu.

gcc/testsuite/ChangeLog:

        * gcc.c-torture/execute/pr17377.c: Mark global variable x
        as volatile.

Signed-off-by: Andrew Pinski <[email protected]>
---
 gcc/testsuite/gcc.c-torture/execute/pr17377.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/gcc/testsuite/gcc.c-torture/execute/pr17377.c 
b/gcc/testsuite/gcc.c-torture/execute/pr17377.c
index 9b2ce078e01..40807777050 100644
--- a/gcc/testsuite/gcc.c-torture/execute/pr17377.c
+++ b/gcc/testsuite/gcc.c-torture/execute/pr17377.c
@@ -28,7 +28,7 @@ f (int i)
   return 0;
 }
 
-int x;
+volatile int x;
 
 void *y (int i) __attribute__ ((__noinline__,__noclone__));
 void *
-- 
2.43.0

Reply via email to