]> git.ipfire.org Git - thirdparty/valgrind.git/commitdiff
Adapt testcase so it can be compiled with GCC 3.4.6.
authorFlorian Krohm <florian@eich-krohm.de>
Sat, 26 Jul 2014 11:36:50 +0000 (11:36 +0000)
committerFlorian Krohm <florian@eich-krohm.de>
Sat, 26 Jul 2014 11:36:50 +0000 (11:36 +0000)
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@14194

memcheck/tests/Makefile.am
memcheck/tests/inltemplate.cpp
memcheck/tests/inltemplate.stderr.exp
memcheck/tests/inltemplate.stderr.exp-old-gcc [new file with mode: 0644]

index b0ba9c545d4c8f3e4793ac1d800325a65680a741..9e2760eff6bc208dde0550a4f7c8952da3bbeda3 100644 (file)
@@ -122,6 +122,7 @@ EXTRA_DIST = \
        inlinfosupp.stderr.exp inlinfosupp.stdout.exp inlinfosupp.supp inlinfosupp.vgtest \
        inlinfosuppobj.stderr.exp inlinfosuppobj.stdout.exp inlinfosuppobj.supp inlinfosuppobj.vgtest \
        inltemplate.stderr.exp inltemplate.stdout.exp inltemplate.vgtest \
+               inltemplate.stderr.exp-old-gcc \
        leak-0.vgtest leak-0.stderr.exp \
        leak-cases-full.vgtest leak-cases-full.stderr.exp \
        leak-cases-possible.vgtest leak-cases-possible.stderr.exp \
index a801d7d3cd4c77bb5590677ac59ec8d9ad701b40..0d31711920994d2d39a41b3d307ab2df8ad0ed8d 100644 (file)
@@ -1,6 +1,15 @@
 #include <stdio.h>
 #include <valgrind.h>
+
+/* GCC 3.4.6 will not compile inlined member template functions.
+   Let's assume GCC 4.x does */
+#ifdef __GNUC__
+#if __GNUC__ > 3
 #define INLINE    inline __attribute__((always_inline))
+#else
+#define INLINE
+#endif
+#endif
 
 class X
 {
index 7e6b30707b6d289e24dafef1a7c6acd8a9f97c38..a72f5f916d25d0c33df7ee0adb7f491231db260c 100644 (file)
@@ -1,5 +1,5 @@
 Conditional jump or move depends on uninitialised value(s)
-   at 0x........: temp_member_func_b<int> (inltemplate.cpp:12)
-   by 0x........: int X::temp_member_func_noinline<int>(int) (inltemplate.cpp:19)
-   by 0x........: main (inltemplate.cpp:27)
+   at 0x........: temp_member_func_b<int> (inltemplate.cpp:21)
+   by 0x........: int X::temp_member_func_noinline<int>(int) (inltemplate.cpp:28)
+   by 0x........: main (inltemplate.cpp:36)
 
diff --git a/memcheck/tests/inltemplate.stderr.exp-old-gcc b/memcheck/tests/inltemplate.stderr.exp-old-gcc
new file mode 100644 (file)
index 0000000..b8be21f
--- /dev/null
@@ -0,0 +1,5 @@
+Conditional jump or move depends on uninitialised value(s)
+   at 0x........: int X::temp_member_func_b<int>(int) (inltemplate.cpp:21)
+   by 0x........: int X::temp_member_func_noinline<int>(int) (inltemplate.cpp:28)
+   by 0x........: main (inltemplate.cpp:36)
+