URL
https://opencores.org/ocsvn/openrisc/openrisc/trunk
Subversion Repositories openrisc
[/] [openrisc/] [trunk/] [gnu-dev/] [or1k-gcc/] [gcc/] [testsuite/] [g++.dg/] [ext/] [gnu-inline-global-reject.C] - Rev 693
Compare with Previous | Blame | View Log
/* Test __attribute__((gnu_inline)).
Check that we reject various forms of duplicate definitions.
*/
/* { dg-do compile } */
/* { dg-options " -ansi -Wno-long-long" } */
#include "gnu-inline-common.h"
#undef fn
#define fn pfx(func_decl_inline_before)
decl(inline, fn) // { dg-error "previous" "" }
gnuindef(fn, 0) // { dg-error "redeclared" "" }
#undef fn
#define fn pfx(func_decl_inline_after)
gnuindef(fn, 0) // { dg-error "previous" "" }
decl(inline, fn) // { dg-error "redeclared" "" }
#undef fn
#define fn pfx(func_def_gnuin_redef)
gnuindef(fn, 0) // { dg-error "previous" "" }
gnuindef(fn, 1) // { dg-error "redefinition" "" }
#undef fn
#define fn pfx(func_def_inline_redef)
def(inline, fn, 0) // { dg-error "previous" "" }
def(inline, fn, 1) // { dg-error "redefinition" "" }
#undef fn
#define fn pfx(func_def_inline_after)
gnuindef(fn, 0) // { dg-error "previous" "" }
def(inline, fn, 1) // { dg-error "redeclare" "" }
#undef fn
#define fn pfx(func_def_inline_before)
def(inline, fn, 0) // { dg-error "previous" "" }
gnuindef(fn, 1) // { dg-error "redefinition" "" }
#undef fn
#define fn pfx(func_def_before)
def(, fn, 0) // { dg-error "previous" "" }
gnuindef(fn, 1) // { dg-error "redefinition" "" }
#undef fn
#define fn pfx(func_decl_static_inline_before)
decl(static inline, fn) // { dg-error "previous" "" }
gnuindef(fn, 0) // { dg-error "redeclared" "" }
#undef fn
#define fn pfx(func_def_static_inline_after)
decl(static, fn)
gnuindef(fn, 0) // { dg-error "previous" "" }
decl(static, fn)
def(static inline, fn, 1) // { dg-error "redeclare" "" }