From 2ad97a1e8d96a09e794e3e3a80bdc16fb4847cb7 Mon Sep 17 00:00:00 2001 From: Christian Bruel Date: Tue, 21 Jun 2011 08:48:45 +0200 Subject: [PATCH] PR middle-end/49139 fix always_inline diagnostics From-SVN: r175242 --- gcc/testsuite/ChangeLog | 1 + gcc/testsuite/gcc.dg/fail_always_inline2.c | 19 +++++++++++++++++++ gcc/testsuite/gcc.dg/inline_1.c | 2 +- gcc/testsuite/gcc.dg/inline_2.c | 2 +- gcc/testsuite/gcc.dg/inline_3.c | 2 +- gcc/testsuite/gcc.dg/inline_4.c | 2 +- gcc/testsuite/gcc.dg/tree-ssa/pr40087.c | 2 +- 7 files changed, 25 insertions(+), 5 deletions(-) create mode 100644 gcc/testsuite/gcc.dg/fail_always_inline2.c diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog index 54767b533f8..d787faa3a46 100644 --- a/gcc/testsuite/ChangeLog +++ b/gcc/testsuite/ChangeLog @@ -10,6 +10,7 @@ * gcc.dg/inline_3.c: Likewise. * gcc.dg/inline_4.c: Likewise. * gcc.dg/20051201-1.c: Likewise. + * gcc.dg/pr40087.c: Likewise. * gcc.dg/torture/pta-structcopy-1.c: Likewise. * gcc.dg/inline-22.c: Likewise. * gcc.dg/lto/20090218-1_0.c: Set inline keyword. diff --git a/gcc/testsuite/gcc.dg/fail_always_inline2.c b/gcc/testsuite/gcc.dg/fail_always_inline2.c new file mode 100644 index 00000000000..863597f7056 --- /dev/null +++ b/gcc/testsuite/gcc.dg/fail_always_inline2.c @@ -0,0 +1,19 @@ +extern char *__realpath_alias (__const char *__restrict __name, char +*__restrict __resolved) __asm__ ("" "realpath") __attribute__ +((__nothrow__)) __attribute__ ((__warn_unused_result__)); + +extern __inline __attribute__ ((__always_inline__)) __attribute__ +((__artificial__)) __attribute__ ((__warn_unused_result__)) char * +__attribute__ ((__nothrow__)) realpath (__const char *__restrict __name, +char *__restrict __resolved) +{ + return __realpath_alias (__name, __resolved); +} + +char * +realpath(path, resolved) + const char *path; + char *resolved; +{ + return (((void *)0)); +} diff --git a/gcc/testsuite/gcc.dg/inline_1.c b/gcc/testsuite/gcc.dg/inline_1.c index 08ccb86f612..3d04b3354ab 100644 --- a/gcc/testsuite/gcc.dg/inline_1.c +++ b/gcc/testsuite/gcc.dg/inline_1.c @@ -1,5 +1,5 @@ /* { dg-do compile } */ -/* { dg-options "-O2 -fdump-tree-optimized -fdisable-tree-einline -fdisable-ipa-inline" } */ +/* { dg-options "-O2 -fdump-tree-optimized -fdisable-tree-einline -fdisable-ipa-inline -Wno-attributes" } */ int g; __attribute__((always_inline)) void bar (void) { diff --git a/gcc/testsuite/gcc.dg/inline_2.c b/gcc/testsuite/gcc.dg/inline_2.c index efdc76a988d..06076997744 100644 --- a/gcc/testsuite/gcc.dg/inline_2.c +++ b/gcc/testsuite/gcc.dg/inline_2.c @@ -1,5 +1,5 @@ /* { dg-do compile } */ -/* { dg-options "-O2 -fdump-tree-optimized -fdisable-tree-einline=0:100 -fdisable-ipa-inline" } */ +/* { dg-options "-O2 -fdump-tree-optimized -fdisable-tree-einline=0:100 -fdisable-ipa-inline -Wno-attributes" } */ int g; __attribute__((always_inline)) void bar (void) { diff --git a/gcc/testsuite/gcc.dg/inline_3.c b/gcc/testsuite/gcc.dg/inline_3.c index 70a23665de2..17871c6e6d5 100644 --- a/gcc/testsuite/gcc.dg/inline_3.c +++ b/gcc/testsuite/gcc.dg/inline_3.c @@ -1,5 +1,5 @@ /* { dg-do compile { target i?86-*-linux* x86_64-*-linux* } } */ -/* { dg-options "-O2 -fdump-tree-optimized -fdisable-tree-einline=foo,foo2 -fdisable-ipa-inline" } */ +/* { dg-options "-O2 -fdump-tree-optimized -fdisable-tree-einline=foo,foo2 -fdisable-ipa-inline -Wno-attributes" } */ int g; __attribute__((always_inline)) void bar (void) { diff --git a/gcc/testsuite/gcc.dg/inline_4.c b/gcc/testsuite/gcc.dg/inline_4.c index 9a85242a4b1..1feefa10168 100644 --- a/gcc/testsuite/gcc.dg/inline_4.c +++ b/gcc/testsuite/gcc.dg/inline_4.c @@ -1,5 +1,5 @@ /* { dg-do compile { target i?86-*-linux* x86_64-*-linux* } } */ -/* { dg-options "-O2 -fdump-tree-optimized -fdisable-tree-einline=foo2 -fdisable-ipa-inline" } */ +/* { dg-options "-O2 -fdump-tree-optimized -fdisable-tree-einline=foo2 -fdisable-ipa-inline -Wno-attributes" } */ int g; __attribute__((always_inline)) void bar (void) { diff --git a/gcc/testsuite/gcc.dg/tree-ssa/pr40087.c b/gcc/testsuite/gcc.dg/tree-ssa/pr40087.c index 22e2b629ed7..98d24378400 100644 --- a/gcc/testsuite/gcc.dg/tree-ssa/pr40087.c +++ b/gcc/testsuite/gcc.dg/tree-ssa/pr40087.c @@ -1,5 +1,5 @@ /* { dg-do run } */ -/* { dg-options "-O1 " } */ +/* { dg-options "-O1 -Wno-attributes" } */ extern void abort (void); -- 2.30.2