pure-1.c: Make functions static again.

* gcc.c-torture/execute/pure-1.c: Make functions static again.
	Don't use attribute `noinline'.

From-SVN: r54767
This commit is contained in:
Kaveh R. Ghazi 2002-06-19 00:43:33 +00:00 committed by Kaveh Ghazi
parent ee77717163
commit 90227c6967
2 changed files with 12 additions and 14 deletions

View File

@ -1,3 +1,8 @@
2002-06-18 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
* gcc.c-torture/execute/pure-1.c: Make functions static again.
Don't use attribute `noinline'.
2002-06-18 Hans-Peter Nilsson <hp@axis.com> 2002-06-18 Hans-Peter Nilsson <hp@axis.com>
* gcc.c-torture/execute/20020615-1.c: Fix typo in comment. * gcc.c-torture/execute/20020615-1.c: Fix typo in comment.

View File

@ -17,20 +17,13 @@ extern int func0 (int) __attribute__ ((__pure__));
extern int func1 (int) __attribute__ ((__const__)); extern int func1 (int) __attribute__ ((__const__));
/* GCC should automatically detect attributes for these functions. /* GCC should automatically detect attributes for these functions.
Don't allow -O3 to inline them. */ At -O3 They'll be inlined, but that's ok. */
#define ANI __attribute__ ((__noinline__)) static int func2 (int a) { return i + a; } /* pure */
static int func3 (int a) { return a * 3; } /* const */
/* ??? If we mark these static, then -O3 will defer them to the end of static int func4 (int a) { return func0(a) + a; } /* pure */
compilation, and we won't have detected anything about them at the static int func5 (int a) { return a + func1(a); } /* const */
point main is compiled. Leaving them public works until someone runs static int func6 (int a) { return func2(a) + a; } /* pure */
the testsuite with -fpic, or has an OS for which targetm.binds_local_p static int func7 (int a) { return a + func3(a); } /* const */
returns false for some reason. */
int ANI func2 (int a) { return i + a; } /* pure */
int ANI func3 (int a) { return a * 3; } /* const */
int ANI func4 (int a) { return func0(a) + a; } /* pure */
int ANI func5 (int a) { return a + func1(a); } /* const */
int ANI func6 (int a) { return func2(a) + a; } /* pure */
int ANI func7 (int a) { return a + func3(a); } /* const */
int main () int main ()
{ {