]> git.ipfire.org Git - thirdparty/valgrind.git/commitdiff
exp-sgcheck/tests/hackedbz2.c mark vex_strlen as noinline
authorMark Wielaard <mark@klomp.org>
Thu, 21 Aug 2014 12:33:31 +0000 (12:33 +0000)
committerMark Wielaard <mark@klomp.org>
Thu, 21 Aug 2014 12:33:31 +0000 (12:33 +0000)
Explicitly set noinline so the test can check it is in the backtrace.
Newer gcc versions happily optimize it away otherwise.

git-svn-id: svn://svn.valgrind.org/valgrind/trunk@14326

exp-sgcheck/tests/hackedbz2.c

index 0d3d8d464343cb6192657c20f4a4c8cd0bfb8317..2f327690c1db7856378f6a1b7de9d5d957e43a44 100644 (file)
@@ -999,8 +999,8 @@ static HChar vex_toupper ( HChar c )
    else
       return c;
 }
-
-static Int vex_strlen ( const HChar* str )
+/* Explicitly set noinline so the test can check it is in the backtrace. */
+static __attribute__(( noinline)) Int vex_strlen ( const HChar* str )
 {
    Int i = 0;
    while (str[i] != 0) i++;