]> sourceware.org Git - systemtap.git/commitdiff
implicptr.c test case: defeat more compiler optimizations
authorFrank Ch. Eigler <fche@redhat.com>
Thu, 22 Jun 2017 19:48:43 +0000 (15:48 -0400)
committerFrank Ch. Eigler <fche@redhat.com>
Thu, 22 Jun 2017 19:48:43 +0000 (15:48 -0400)
Force the compiler to not optimize away a few more locals.

testsuite/systemtap.base/implicitptr.c

index f9d19dcfa3020ad8eaa08a3a3ee91ffe07f01ac7..7067cd957b396d38da988ba026b4059e7ac9c2e3 100644 (file)
@@ -3,6 +3,9 @@
 #define MARK(name) STAP_PROBE(implicitptr, name)
 
 int z;
+int **j2;
+int ***k2;
+int ****l2;
 
 static int
 foo (int i)
@@ -10,6 +13,7 @@ foo (int i)
   int *j = &i;
   int **k = &j;
   int ***l = &k;
+  j2 = &j; k2 = &k; l2 = &l;
  l1: MARK (foo_l1);
   z++;               /* side effect helps the probe placement hit right */
   i++;
This page took 1.297844 seconds and 5 git commands to generate.