From: Jonathan Larmour Date: Wed, 10 Jan 2001 04:19:31 +0000 (+0000) Subject: 20000419-2.c: Move to "special" subdirectory. X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=2830551dc4bfd603ba186b41191cd42e278bed34;p=gcc.git 20000419-2.c: Move to "special" subdirectory. * gcc.dg/20000419-2.c: Move to "special" subdirectory. * gcc.dg/special/20000419-2.c: New file. Identical to above. * gcc.dg/special/special.exp: New test driver which will check for alias support for the above test. From-SVN: r38852 --- diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog index 82ccbab910b..48d61914fe3 100644 --- a/gcc/testsuite/ChangeLog +++ b/gcc/testsuite/ChangeLog @@ -1,3 +1,10 @@ +2001-01-08 Jonathan Larmour + + * gcc.dg/20000419-2.c: Move to "special" subdirectory. + * gcc.dg/special/20000419-2.c: New file. Identical to above. + * gcc.dg/special/special.exp: New test driver which will check + for alias support for the above test. + 2001-01-09 Alan Lehotsky * gcc.c-torture/execute/921202-1.c: Use STACK_SIZE to avoid diff --git a/gcc/testsuite/gcc.dg/20000419-2.c b/gcc/testsuite/gcc.dg/20000419-2.c deleted file mode 100644 index 05e4729572c..00000000000 --- a/gcc/testsuite/gcc.dg/20000419-2.c +++ /dev/null @@ -1,17 +0,0 @@ -/* A static function with a global alias should not get 'defined but - not used' warnings. Exposed by Linux kernel. */ -/* { dg-do compile } */ -/* { dg-options "-Wall" } */ - -extern void do_something (void); -extern void do_something_else (void); - -static int -init_foobar(void) /* { dg-bogus "defined but not used" "not used warning" } */ -{ - do_something(); - do_something_else(); - return 0; -} - -int init_module(void) __attribute__((alias("init_foobar"))); diff --git a/gcc/testsuite/gcc.dg/special/20000419-2.c b/gcc/testsuite/gcc.dg/special/20000419-2.c new file mode 100644 index 00000000000..05e4729572c --- /dev/null +++ b/gcc/testsuite/gcc.dg/special/20000419-2.c @@ -0,0 +1,17 @@ +/* A static function with a global alias should not get 'defined but + not used' warnings. Exposed by Linux kernel. */ +/* { dg-do compile } */ +/* { dg-options "-Wall" } */ + +extern void do_something (void); +extern void do_something_else (void); + +static int +init_foobar(void) /* { dg-bogus "defined but not used" "not used warning" } */ +{ + do_something(); + do_something_else(); + return 0; +} + +int init_module(void) __attribute__((alias("init_foobar"))); diff --git a/gcc/testsuite/gcc.dg/special/special.exp b/gcc/testsuite/gcc.dg/special/special.exp new file mode 100644 index 00000000000..25c441204fb --- /dev/null +++ b/gcc/testsuite/gcc.dg/special/special.exp @@ -0,0 +1,40 @@ +# Copyright (C) 2001 Free Software Foundation, Inc. + +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 2 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program; if not, write to the Free Software +# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. + +# Please email any bugs, comments, and/or additions to this file to: +# jlarmour@redhat.com + +# This file was written by Jonathan Larmour (jlarmour@redhat.com). + +# GCC testsuite that uses the `dg.exp' driver. + +# Load support procs. +load_lib gcc-dg.exp + +############## +# 20000419-2.c +############## + +dg-init +switch [check_alias_available "$srcdir/$subdir/20000419-2.c"] { + yes { dg-runtest "$srcdir/$subdir/20000419-2.c" "" "" } + no { unsupported "20000419-2.c" } + default { fail "20000419-2.c" } +} +dg-finish + + +### EOF special.exp