From 4ff612557bed4293bbe3d703296cfd851117e59d Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?David=20B=C3=BChler?= <david.buhler@cea.fr>
Date: Wed, 25 Mar 2020 13:28:09 +0100
Subject: [PATCH] [slicing] Fixes a test that returned a function g instead of
 an integer G.

---
 tests/slicing/oracle/slice_no_body.res.oracle | 10 ++--------
 tests/slicing/slice_no_body.i                 |  2 +-
 2 files changed, 3 insertions(+), 9 deletions(-)

diff --git a/tests/slicing/oracle/slice_no_body.res.oracle b/tests/slicing/oracle/slice_no_body.res.oracle
index 2960de9c498..dcba3c11fcc 100644
--- a/tests/slicing/oracle/slice_no_body.res.oracle
+++ b/tests/slicing/oracle/slice_no_body.res.oracle
@@ -102,7 +102,6 @@ Print slice = h_slice_1:
 
 /**/int h(void)
 {
-  /* <[---], [---]> */ int __retres;
   /* invisible call */ /* <[---], [---]> */
   /* <[---], [---]> */ int a = f(1);
   /* invisible call */ /* <[---], [---]> */
@@ -117,9 +116,7 @@ Print slice = h_slice_1:
     G = g(c);
   }
   /* <[---], [---]> */
-  __retres = (int)(& g);
-  /* <[---], [---]> */
-  return __retres;
+  return G;
 }
 
 Slicing project worklist [default] =
@@ -223,7 +220,6 @@ Print slice = h_slice_1: (InCtrl: <[---], [ S ]>)
 
 /**/int h(void)
 {
-  /* <[---], [---]> */ int __retres;
   /* sig call:
     (InCtrl: <[---], [ S ]>)
     (In1: <[---], [ S ]>)
@@ -262,9 +258,7 @@ Print slice = h_slice_1: (InCtrl: <[---], [ S ]>)
     G = g(c);
   }
   /* <[---], [---]> */
-  __retres = (int)(& g);
-  /* <[---], [---]> */
-  return __retres;
+  return G;
 }
 
 Slicing project worklist [default] =
diff --git a/tests/slicing/slice_no_body.i b/tests/slicing/slice_no_body.i
index 8e97f4c920a..e2be30cc3c6 100644
--- a/tests/slicing/slice_no_body.i
+++ b/tests/slicing/slice_no_body.i
@@ -24,5 +24,5 @@ int h (void) {
   G = f (4);
   if (G > 0)
     G = g (c);
-  return (int)g;
+  return G;
 }
-- 
GitLab