This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
[PATCH, committed] Fix chkp-always_inline.c test to not fail with -fpic
- From: Ilya Enkovich <enkovich dot gnu at gmail dot com>
- To: gcc-patches at gcc dot gnu dot org
- Date: Tue, 20 Jan 2015 16:47:00 +0300
- Subject: [PATCH, committed] Fix chkp-always_inline.c test to not fail with -fpic
- Authentication-results: sourceware.org; auth=none
Hi,
chkp-always_inline.c test fails with -fpic (https://gcc.gnu.org/ml/gcc-regression/2015-01/msg00528.html) because of non static function with 'always_inline' attribute. This patch fixes it. Committed as obvious.
Thanks,
Ilya
--
2015-01-20 Ilya Enkovich <ilya.enkovich@intel.com>
* gcc.target/i386/chkp-always_inline.c (f1): Make static
to avoid errors with -fpic.
diff --git a/gcc/testsuite/gcc.target/i386/chkp-always_inline.c b/gcc/testsuite/gcc.target/i386/chkp-always_inline.c
index 16d2358..26e80fe 100644
--- a/gcc/testsuite/gcc.target/i386/chkp-always_inline.c
+++ b/gcc/testsuite/gcc.target/i386/chkp-always_inline.c
@@ -2,7 +2,7 @@
/* { dg-require-effective-target mpx } */
/* { dg-options "-fcheck-pointer-bounds -mmpx -O2 -Wno-attributes" } */
-__attribute__((always_inline)) int f1 (int *p)
+static __attribute__((always_inline)) int f1 (int *p)
{
return *p;
}