OpenCores
URL https://opencores.org/ocsvn/openrisc/openrisc/trunk

Subversion Repositories openrisc

Compare Revisions

  • This comparison shows the changes necessary to convert path
    /openrisc/trunk/gnu-old/gcc-4.2.2/gcc/testsuite/gcc.dg/special
    from Rev 154 to Rev 816
    Reverse comparison

Rev 154 → Rev 816

/20000419-2.c
0,0 → 1,18
/* A static function with a global alias should not get 'defined but
not used' warnings. Exposed by Linux kernel. */
/* { dg-do compile } */
/* { dg-require-alias "" } */
/* { 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")));
20000419-2.c Property changes : Added: svn:eol-style ## -0,0 +1 ## +native \ No newline at end of property Added: svn:keywords ## -0,0 +1 ## +Id \ No newline at end of property Index: wkali-1.c =================================================================== --- wkali-1.c (nonexistent) +++ wkali-1.c (revision 816) @@ -0,0 +1,19 @@ +/* { dg-do link } */ +/* { dg-require-weak "" } */ +/* { dg-require-alias "" } */ + +#include + +extern int foo(void) __attribute__((weak, alias("bar"))); + +int bar(void) { + return 1; +} + +int main(void) { + + if (foo()) + exit(0); + else + abort(); +}
wkali-1.c Property changes : Added: svn:eol-style ## -0,0 +1 ## +native \ No newline at end of property Added: svn:keywords ## -0,0 +1 ## +Id \ No newline at end of property Index: wkali-2.c =================================================================== --- wkali-2.c (nonexistent) +++ wkali-2.c (revision 816) @@ -0,0 +1,16 @@ +/* { dg-do run } */ +/* { dg-require-weak "" } */ +/* { dg-require-alias "" } */ +/* { dg-additional-sources "wkali-2a.c wkali-2b.c" } */ + +#include + +extern int foo(void); + +int main(void) { + + if (foo()) + exit(0); + else + abort(); +}
wkali-2.c Property changes : Added: svn:eol-style ## -0,0 +1 ## +native \ No newline at end of property Added: svn:keywords ## -0,0 +1 ## +Id \ No newline at end of property Index: wkali-2a.c =================================================================== --- wkali-2a.c (nonexistent) +++ wkali-2a.c (revision 816) @@ -0,0 +1,7 @@ +/* { dg-do run } */ + +extern int foo(void) __attribute__((weak, alias("bar_a"))); + +int bar_a(void) { + return 0; +}
wkali-2a.c Property changes : Added: svn:eol-style ## -0,0 +1 ## +native \ No newline at end of property Added: svn:keywords ## -0,0 +1 ## +Id \ No newline at end of property Index: wkali-2b.c =================================================================== --- wkali-2b.c (nonexistent) +++ wkali-2b.c (revision 816) @@ -0,0 +1,7 @@ +/* { dg-do run } */ + +extern int foo(void) __attribute__((alias("bar_b"))); + +int bar_b(void) { + return 1; +}
wkali-2b.c Property changes : Added: svn:eol-style ## -0,0 +1 ## +native \ No newline at end of property Added: svn:keywords ## -0,0 +1 ## +Id \ No newline at end of property Index: mips-abi.exp =================================================================== --- mips-abi.exp (nonexistent) +++ mips-abi.exp (revision 816) @@ -0,0 +1,104 @@ +# Copyright (C) 2002, 2004, 2007 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 3 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 GCC; see the file COPYING3. If not see +# . + +# This test checks whether MIPS ELF configurations pass the right +# ABI flags to the assembler. An ABI flag should always be passed +# unless MEABI is selected. + +load_lib gcc-dg.exp + +# Only run this test on MIPS ELF targets +if {![istarget mips*-*-*] || [gcc_target_object_format] != "elf"} { + return +} + +# A list of all assembler ABI flags. +set asm_abi_flags {-mabi=32 -mabi=n32 -mabi=64 -mabi=o64 -mabi=eabi} + +# Try to assemble mips-abi.s (an empty file), passing -v in order to +# get the assembler command line. Check whether an appropriate ABI +# flag is passed. +# +# NAME is a name for the pass/fail line. +# ABIS is a list of acceptable assembler ABI flags, or "" if no +# ABI flag is expected. +# FLAGS is a list of options for gcc. +proc check_mips_abi {name abis flags} { + global srcdir subdir + + lappend flags "-v" + set lines [gcc_target_compile "$srcdir/$subdir/mips-abi.s" \ + "mips-abi.o" object \ + [list "additional_flags=$flags"]] + set good 0 + set bad 0 + foreach line [split $lines "\n"] { + # Find the assembler command line. + if {[string first "$srcdir/$subdir/mips-abi.s" $line] >= 0} { + foreach arg [split $line " "] { + # Count the number of matching and non-matching + # ABI options. + if {[lsearch -exact $abis $arg] >= 0} { + incr good + } elseif {[string match "-mabi=*" $arg]} { + incr bad + } + } + } + } + if {$good == ($abis != "") && $bad == 0} { + pass "mips-abi $name" + } else { + fail "mips-abi $name" + } +} + +# Collect the default target flags. +set default_flags "" +set target [target_info name] +if {[info exists CFLAGS_FOR_TARGET]} { + append default_flags " $CFLAGS_FOR_TARGET" +} +if {[board_info $target exists cflags]} { + append default_flags " [board_info $target cflags]" +} +if {[board_info $target exists multilib_flags]} { + append default_flags " [board_info $target multilib_flags]" +} + +# See whether the default command line specifies an ABI. +set default_abi "" +foreach flag $default_flags { + if {[string match "-mabi=*" $flag]} { + set default_abi $flag + } +} + +# If the command line does specify an ABI, just check for the +# appropriate assembler flag. +if {$default_abi != ""} { + check_mips_abi "command line" $default_abi "" +} else { + # An ABI should be passed to the assembler by default. + # It doesn't seem worthwhile to duplicate the + # configuration to ABI logic here, so just accept any ABI. + check_mips_abi "default" $asm_abi_flags "" + + # See whether passing a -mabi flag does the right thing. + foreach abi $asm_abi_flags { + check_mips_abi $abi $abi $abi + } +} Index: mips-abi.s =================================================================== Index: mips-abi.s =================================================================== --- mips-abi.s (nonexistent) +++ mips-abi.s (revision 816)
mips-abi.s Property changes : Added: svn:eol-style ## -0,0 +1 ## +native \ No newline at end of property Added: svn:keywords ## -0,0 +1 ## +Id \ No newline at end of property Index: gcsec-1.c =================================================================== --- gcsec-1.c (nonexistent) +++ gcsec-1.c (revision 816) @@ -0,0 +1,30 @@ +/* AIX gld supports garbage collection. But AIX gcc does not support + -ffunction-sections or -fdata-sections. */ +/* { dg-do run { xfail rs6000-*-aix* powerpc*-*-aix* } } */ +/* { dg-require-gc-sections "" } */ + +/* { dg-options "-ffunction-sections -fdata-sections -Wl,--gc-sections -static" } */ +/* { dg-options "-ffunction-sections -fdata-sections -Wl,--gc-sections -static" { target native } } */ +/* { dg-options "-ffunction-sections -fdata-sections -Wl,--gc-sections" { target *-*-netware* } } */ + +#include + +static int unusedint=5; + +static int usedint=1; + +int unused(void) { + return 1; +} + +int foo(void) { + return usedint; +} + +int main(void) { + + if (foo()) + exit(0); + else + abort(); +}
gcsec-1.c Property changes : Added: svn:eol-style ## -0,0 +1 ## +native \ No newline at end of property Added: svn:keywords ## -0,0 +1 ## +Id \ No newline at end of property Index: weak-1.c =================================================================== --- weak-1.c (nonexistent) +++ weak-1.c (revision 816) @@ -0,0 +1,20 @@ +/* { dg-do run { xfail { hppa*-*-hpux* && { ! hppa*64*-*-* } } } } */ +/* { dg-require-weak "" } */ +/* { dg-additional-sources weak-1a.c } */ +/* See PR target/23387 for hppa xfail details. */ + +#include + +int foo(void) __attribute__((weak)); + +int foo(void) { + return 0; +} + +int main(void) { + + if (foo()) + exit(0); + else + abort(); +}
weak-1.c Property changes : Added: svn:eol-style ## -0,0 +1 ## +native \ No newline at end of property Added: svn:keywords ## -0,0 +1 ## +Id \ No newline at end of property Index: weak-1a.c =================================================================== --- weak-1a.c (nonexistent) +++ weak-1a.c (revision 816) @@ -0,0 +1,3 @@ +int foo(void) { + return 1; +}
weak-1a.c Property changes : Added: svn:eol-style ## -0,0 +1 ## +native \ No newline at end of property Added: svn:keywords ## -0,0 +1 ## +Id \ No newline at end of property Index: weak-2.c =================================================================== --- weak-2.c (nonexistent) +++ weak-2.c (revision 816) @@ -0,0 +1,15 @@ +/* { dg-do run } */ +/* { dg-require-weak "" } */ +/* { dg-additional-sources "weak-2a.c weak-2b.c" } */ + +#include + +extern int foo(void); + +int main(void) { + + if (foo()) + exit(0); + else + abort(); +}
weak-2.c Property changes : Added: svn:eol-style ## -0,0 +1 ## +native \ No newline at end of property Added: svn:keywords ## -0,0 +1 ## +Id \ No newline at end of property Index: alias-1.c =================================================================== --- alias-1.c (nonexistent) +++ alias-1.c (revision 816) @@ -0,0 +1,18 @@ +/* { dg-do link } */ +/* { dg-require-alias "" } */ + +#include + +extern int foo(void) __attribute__((alias("bar"))); + +int bar(void) { + return 1; +} + +int main(void) { + + if (foo()) + exit(0); + else + abort(); +}
alias-1.c Property changes : Added: svn:eol-style ## -0,0 +1 ## +native \ No newline at end of property Added: svn:keywords ## -0,0 +1 ## +Id \ No newline at end of property Index: weak-2a.c =================================================================== --- weak-2a.c (nonexistent) +++ weak-2a.c (revision 816) @@ -0,0 +1,5 @@ +int foo(void) __attribute__((weak)); + +int foo(void) { + return 0; +}
weak-2a.c Property changes : Added: svn:eol-style ## -0,0 +1 ## +native \ No newline at end of property Added: svn:keywords ## -0,0 +1 ## +Id \ No newline at end of property Index: alias-2.c =================================================================== --- alias-2.c (nonexistent) +++ alias-2.c (revision 816) @@ -0,0 +1,19 @@ +/* PR 3997 */ +/* { dg-do run } */ +/* { dg-require-alias "" } */ + +extern void abort (void); +extern void exit (int); + +void foo(void) +{ + exit(0); +} + +static void bar(void) __attribute__((alias("foo"))); + +int main() +{ + bar(); + abort (); +}
alias-2.c Property changes : Added: svn:eol-style ## -0,0 +1 ## +native \ No newline at end of property Added: svn:keywords ## -0,0 +1 ## +Id \ No newline at end of property Index: weak-2b.c =================================================================== --- weak-2b.c (nonexistent) +++ weak-2b.c (revision 816) @@ -0,0 +1,3 @@ +int foo(void) { + return 1; +}
weak-2b.c Property changes : Added: svn:eol-style ## -0,0 +1 ## +native \ No newline at end of property Added: svn:keywords ## -0,0 +1 ## +Id \ No newline at end of property Index: special.exp =================================================================== --- special.exp (nonexistent) +++ special.exp (revision 816) @@ -0,0 +1,32 @@ +# Copyright (C) 2001, 2003, 2007 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 3 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 GCC; see the file COPYING3. If not see +# . + +# 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 + +dg-init +dg-runtest [lsort [glob -nocomplain $srcdir/$subdir/*\[1-9\].c]] \ + "" "" +dg-finish + +### EOF special.exp

powered by: WebSVN 2.1.0

© copyright 1999-2024 OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.