Commit 8994e34a by Marek Polacek Committed by Marek Polacek

inline-2.c: Fix implicit declarations.

	* gcc.dg/ipa/inline-2.c: Fix implicit declarations.
	* gcc.dg/ipa/inline-4.c: Likewise.
	* gcc.dg/ipa/inline-5.c: Likewise.
	* gcc.dg/ipa/pr57539.c: Likewise.
	* gcc.dg/ipa/inline-6.c: Fix implicit declarations.  Fix
	defaulting to int.
	* gcc.dg/ipa/inlinehint-1.c: Likewise.
	* gcc.dg/ipa/inlinehint-3.c: Likewise.
	* gcc.dg/ipa/inlinehint-2.c: Fix defaulting to int.
	* gcc.dg/ipa/ipacost-1.c: Likewise.
	* gcc.dg/ipa/ipacost-2.c: Likewise.
	* gcc.dg/ipa/pure-const-1.c: Use -fgnu89-inline.  Fix defaulting
	to int.

From-SVN: r215920
parent f9258923
2014-10-06 Marek Polacek <polacek@redhat.com> 2014-10-06 Marek Polacek <polacek@redhat.com>
* gcc.dg/ipa/inline-2.c: Fix implicit declarations.
* gcc.dg/ipa/inline-4.c: Likewise.
* gcc.dg/ipa/inline-5.c: Likewise.
* gcc.dg/ipa/pr57539.c: Likewise.
* gcc.dg/ipa/inline-6.c: Fix implicit declarations. Fix
defaulting to int.
* gcc.dg/ipa/inlinehint-1.c: Likewise.
* gcc.dg/ipa/inlinehint-3.c: Likewise.
* gcc.dg/ipa/inlinehint-2.c: Fix defaulting to int.
* gcc.dg/ipa/ipacost-1.c: Likewise.
* gcc.dg/ipa/ipacost-2.c: Likewise.
* gcc.dg/ipa/pure-const-1.c: Use -fgnu89-inline. Fix defaulting
to int.
2014-10-06 Marek Polacek <polacek@redhat.com>
* gcc.dg/debug/20010207-1.c: Use -fgnu89-inline. Fix implicit * gcc.dg/debug/20010207-1.c: Use -fgnu89-inline. Fix implicit
declarations. declarations.
* gcc.dg/debug/dwarf2-2.c: Fix defaulting to int. * gcc.dg/debug/dwarf2-2.c: Fix defaulting to int.
......
...@@ -3,6 +3,7 @@ ...@@ -3,6 +3,7 @@
/* { dg-options "-O3 -c -fdump-ipa-inline -fno-early-inlining" } */ /* { dg-options "-O3 -c -fdump-ipa-inline -fno-early-inlining" } */
struct bah {int a,b,d;}; struct bah {int a,b,d;};
void test3 (int, int, int, int, int);
__attribute__ ((noinline)) __attribute__ ((noinline))
void test(int a,int b,int c,int d,int e) void test(int a,int b,int c,int d,int e)
......
/* { dg-do compile } */ /* { dg-do compile } */
/* { dg-options "-Os -c -fdump-ipa-inline -fno-early-inlining -fno-partial-inlining -fno-ipa-cp" } */ /* { dg-options "-Os -c -fdump-ipa-inline -fno-early-inlining -fno-partial-inlining -fno-ipa-cp" } */
void work_hard (void);
void do_something (int shall_i_work) void do_something (int shall_i_work)
{ {
if (shall_i_work) if (shall_i_work)
......
/* Check statements that are eliminated by inlining. */ /* Check statements that are eliminated by inlining. */
/* { dg-do compile } */ /* { dg-do compile } */
/* { dg-options "-O2 -fdump-ipa-inline-details -fno-early-inlining -fno-partial-inlining -fno-ipa-cp" } */ /* { dg-options "-O2 -fdump-ipa-inline-details -fno-early-inlining -fno-partial-inlining -fno-ipa-cp" } */
struct a {int a,b,c,d,e;}; struct a {int a,b,c,d,e;};
void t(int);
void t2();
void void
accessfield (struct a a) accessfield (struct a a)
......
/* Check statements that are eliminated by inlining. */ /* Check statements that are eliminated by inlining. */
/* { dg-do compile } */ /* { dg-do compile } */
/* { dg-options "-O2 -fdump-ipa-inline-details -fno-early-inlining -fno-partial-inlining -fno-ipa-cp" } */ /* { dg-options "-O2 -fdump-ipa-inline-details -fno-early-inlining -fno-partial-inlining -fno-ipa-cp" } */
static t(int a)
void foo (void);
void bar (void);
void bagr (void);
static int t(int a)
{ {
if (a==1) if (a==1)
{ {
...@@ -32,6 +37,7 @@ static t(int a) ...@@ -32,6 +37,7 @@ static t(int a)
bagr(); bagr(); bagr(); bagr(); bagr(); bagr(); bagr(); bagr(); bagr(); bagr(); bagr(); bagr(); bagr(); bagr(); bagr(); bagr(); bagr(); bagr(); bagr(); bagr(); bagr(); bagr(); bagr(); bagr(); bagr(); bagr(); bagr(); bagr(); bagr(); bagr(); bagr(); bagr(); bagr(); bagr(); bagr(); bagr(); bagr(); bagr(); bagr(); bagr(); bagr(); bagr(); bagr(); bagr(); bagr(); bagr(); bagr(); bagr(); bagr(); bagr(); bagr(); bagr(); bagr(); bagr(); bagr(); bagr(); bagr(); bagr(); bagr(); bagr(); bagr(); bagr(); bagr(); bagr(); bagr(); bagr(); bagr(); bagr(); bagr(); bagr(); bagr(); bagr(); bagr(); bagr(); bagr(); bagr(); bagr(); bagr(); bagr(); bagr(); bagr(); bagr(); bagr(); bagr(); bagr(); bagr(); bagr(); bagr(); bagr(); bagr(); bagr(); bagr(); bagr(); bagr(); bagr(); bagr(); bagr(); bagr(); bagr(); bagr(); bagr(); bagr(); bagr(); bagr(); bagr(); bagr(); bagr(); bagr(); bagr(); bagr(); bagr(); bagr(); bagr(); bagr(); bagr(); bagr(); bagr(); bagr(); bagr(); bagr(); bagr(); bagr(); bagr(); bagr(); bagr(); bagr(); bagr(); bagr(); bagr(); bagr(); bagr(); bagr(); bagr(); bagr(); bagr(); bagr(); bagr(); bagr(); bagr(); bagr(); bagr(); bagr(); bagr(); bagr(); bagr(); bagr(); bagr(); bagr(); bagr(); bagr(); bagr(); bagr(); bagr(); bagr(); bagr(); bagr(); bagr(); bagr(); bagr(); bagr(); bagr(); bagr(); bagr(); bagr(); bagr(); bagr(); bagr(); bagr(); bagr(); bagr(); bagr(); bagr(); bagr(); bagr(); bagr(); bagr(); bagr(); bagr(); bagr(); bagr(); bagr(); bagr(); bagr(); bagr(); bagr(); bagr(); bagr(); bagr(); bagr(); bagr(); bagr(); bagr(); bagr(); bagr(); bagr(); bagr(); bagr(); bagr(); bagr(); bagr(); bagr(); bagr();
} }
} }
int
main() main()
{ {
t(1); t(1);
......
/* { dg-options "-O3 -c -fdump-ipa-inline-details -fno-early-inlining -fno-ipa-cp" } */ /* { dg-options "-O3 -c -fdump-ipa-inline-details -fno-early-inlining -fno-ipa-cp" } */
void test2 (int);
int
test (int a) test (int a)
{ {
int i; int i;
...@@ -8,6 +10,7 @@ test (int a) ...@@ -8,6 +10,7 @@ test (int a)
test2(a); test2(a);
} }
} }
int
m() m()
{ {
test (10); test (10);
......
/* { dg-options "-O3 -c -fdump-ipa-inline-details -fno-early-inlining -fno-ipa-cp" } */ /* { dg-options "-O3 -c -fdump-ipa-inline-details -fno-early-inlining -fno-ipa-cp" } */
int
t(int s, void **p) t(int s, void **p)
{ {
int i; int i;
for (i;i<10000;i+=s) for (i;i<10000;i+=s)
p[i]=0; p[i]=0;
} }
int
m(void **p) m(void **p)
{ {
t (10, p); t (10, p);
......
/* { dg-options "-O3 -c -fdump-ipa-inline-details -fno-early-inlining -fno-ipa-cp" } */ /* { dg-options "-O3 -c -fdump-ipa-inline-details -fno-early-inlining -fno-ipa-cp" } */
void abort (void); void abort (void);
int scc_entry (int);
int sum; int sum;
int a[10]; int a[10];
int int
...@@ -20,6 +21,7 @@ scc_entry (int c) ...@@ -20,6 +21,7 @@ scc_entry (int c)
scc_next (c); scc_next (c);
return sum; return sum;
} }
int
main() main()
{ {
int sum; int sum;
......
...@@ -43,6 +43,7 @@ i_can_not_be_propagated_fully2 (int *a) ...@@ -43,6 +43,7 @@ i_can_not_be_propagated_fully2 (int *a)
i_can_not_be_propagated_fully (a); i_can_not_be_propagated_fully (a);
i_can_not_be_propagated_fully (a); i_can_not_be_propagated_fully (a);
} }
int
main() main()
{ {
i_can_be_propagated_fully2 (array); i_can_be_propagated_fully2 (array);
......
...@@ -59,6 +59,7 @@ i_can_not_be_propagated_fully2 (int *a) ...@@ -59,6 +59,7 @@ i_can_not_be_propagated_fully2 (int *a)
} }
i_can_not_be_propagated_fully (a); i_can_not_be_propagated_fully (a);
} }
int
main() main()
{ {
int i; int i;
......
...@@ -91,6 +91,8 @@ typedef struct nitem ...@@ -91,6 +91,8 @@ typedef struct nitem
nitem; nitem;
typedef int (*distfn) (box *, box *); typedef int (*distfn) (box *, box *);
typedef int (*intersectfn) (nitem *, nitem *); typedef int (*intersectfn) (nitem *, nitem *);
int agnnodes (graph_t *);
int overlaps (nitem *, int);
static int static int
cmpitem (Dt_t * d, int *p1, int *p2, Dtdisc_t * disc) cmpitem (Dt_t * d, int *p1, int *p2, Dtdisc_t * disc)
{ {
......
/* { dg-do compile { target nonpic } } */ /* { dg-do compile { target nonpic } } */
/* { dg-options "-O3 -fdump-tree-local-pure-const1 -fdump-ipa-pure-const -fdump-tree-optimized -fno-early-inlining" } */ /* { dg-options "-O3 -fdump-tree-local-pure-const1 -fdump-ipa-pure-const -fdump-tree-optimized -fno-early-inlining -fgnu89-inline" } */
void abort (void); void abort (void);
int error_code; int error_code;
static int val; static int val;
...@@ -32,20 +32,20 @@ call_callback(int (*fn)(int), int a) ...@@ -32,20 +32,20 @@ call_callback(int (*fn)(int), int a)
return fn(a); return fn(a);
} }
__attribute__ ((noinline, noclone)) __attribute__ ((noinline, noclone)) int
i_am_const3(int a) i_am_const3(int a)
{ {
return call_callback (call_me, a); return call_callback (call_me, a);
} }
__attribute__ ((noinline)) __attribute__ ((noinline)) int
explode_badly() explode_badly()
{ {
error_code = 0xbad; error_code = 0xbad;
abort (); abort ();
} }
__attribute__ ((noinline, noclone)) __attribute__ ((noinline, noclone)) int
i_am_pure4(int a) i_am_pure4(int a)
{ {
if (a > 50) if (a > 50)
...@@ -53,6 +53,7 @@ i_am_pure4(int a) ...@@ -53,6 +53,7 @@ i_am_pure4(int a)
return a; return a;
} }
int
test() test()
{ {
int s; int s;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment