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

Subversion Repositories openrisc_me

Compare Revisions

  • This comparison shows the changes necessary to convert path
    /openrisc/trunk/gnu-src/gcc-4.2.2/gcc/testsuite/g++.dg/charset
    from Rev 149 to Rev 154
    Reverse comparison

Rev 149 → Rev 154

/asm1.c
0,0 → 1,14
/* { dg-do compile { target *-*-* } }
{ dg-require-iconv "IBM1047" }
{ dg-final { scan-assembler ".ascii bar" } }
{ dg-final { scan-assembler ".ascii foo" } }
*/
extern int x, y;
 
asm (".ascii bar");
 
int foo (void)
{
__asm__ (".ascii foo");
return 0;
}
asm1.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: asm2.c =================================================================== --- asm2.c (nonexistent) +++ asm2.c (revision 154) @@ -0,0 +1,33 @@ +/* Test for complex asm statements. Make sure it compiles + then test for some of the asm statements not being translated. */ +/* { dg-do compile { target i?86-*-* x86_64-*-* } } + { dg-require-iconv "IBM1047" } + { dg-final { scan-assembler "std" } } + { dg-final { scan-assembler "cld" } } + { dg-final { scan-assembler "rep" } } + { dg-final { scan-assembler "movsb" } } */ +#define size_t int +void * +memmove (void *__dest, __const void *__src, size_t __n) +{ + register unsigned long int __d0, __d1, __d2; + if (__dest < __src) + __asm__ __volatile__ + ("cld\n\t" + "rep\n\t" + "movsb" + : "=&c" (__d0), "=&S" (__d1), "=&D" (__d2) + : "0" (__n), "1" (__src), "2" (__dest) + : "memory"); + else + __asm__ __volatile__ + ("std\n\t" + "rep\n\t" + "movsb\n\t" + "cld" + : "=&c" (__d0), "=&S" (__d1), "=&D" (__d2) + : "0" (__n), "1" (__n - 1 + (const char *) __src), + "2" (__n - 1 + (char *) __dest) + : "memory"); + return __dest; +}
asm2.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: asm3.c =================================================================== --- asm3.c (nonexistent) +++ asm3.c (revision 154) @@ -0,0 +1,10 @@ +/* Simple asm test. */ +/* { dg-do compile } + { dg-require-iconv "IBM1047" } + { dg-final { scan-assembler "foo" } } */ +extern int bar; + +int main (void) +{ + asm ("foo %0" : "=r" (bar)); +}
asm3.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: charset.exp =================================================================== --- charset.exp (nonexistent) +++ charset.exp (revision 154) @@ -0,0 +1,44 @@ +# Copyright (C) 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 +# . + +# GCC testsuite that uses the 'dg.exp' driver. + +# There's a bunch of headers we need. +if [is_remote host] { + foreach header [glob -nocomplain $srcdir/$subdir/*.{h,def} ] { + remote_download host $header + } +} + +# Load support procs. +load_lib g++-dg.exp +load_lib target-supports.exp + +# If a testcase doesn't have special options, use these. +global DEFAULT_CHARSETCFLAGS +if ![info exists DEFAULT_CHARSETCFLAGS] then { + set DEFAULT_CHARSETCFLAGS "-fexec-charset=IBM1047" +} + +# Initialize `dg'. +dg-init + +# Main loop. +dg-runtest [lsort [glob -nocomplain $srcdir/$subdir/*.{c,cc,S} ]] \ + "" $DEFAULT_CHARSETCFLAGS + +# All done. +dg-finish Index: asm4.c =================================================================== --- asm4.c (nonexistent) +++ asm4.c (revision 154) @@ -0,0 +1,8 @@ +/* Test for string translation. */ +/* { dg-do compile } + { dg-require-iconv "IBM1047" } + { dg-final { scan-assembler-not "translate" } } */ +void foo (void) +{ + asm ("xx" : : "r"("translate") : "cc"); +}
asm4.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: attribute1.c =================================================================== --- attribute1.c (nonexistent) +++ attribute1.c (revision 154) @@ -0,0 +1,10 @@ +/* Test for attribute non-translation. */ +/* { dg-do compile } + { dg-require-iconv "IBM1047" } + { dg-final { scan-assembler "foo" } } */ +int walrus __attribute__ ((section (".foo"))); + +int main (void) +{ + return 0; +}
attribute1.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: asm5.c =================================================================== --- asm5.c (nonexistent) +++ asm5.c (revision 154) @@ -0,0 +1,13 @@ +/* Test for string translation. */ +/* { dg-do compile } + { dg-require-iconv "IBM1047" } + { dg-final { scan-assembler "foo" } } */ +int main() +{ + unsigned long int *ptr; + ptr = ((unsigned long int *) + ( { void *stack_ptr; + __asm__ __volatile__ ( "foo %0" : "=r" (stack_ptr) ); + (stack_ptr); } ) ); + return 0; +}
asm5.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: attribute2.c =================================================================== --- attribute2.c (nonexistent) +++ attribute2.c (revision 154) @@ -0,0 +1,8 @@ +/* Test to make sure that invalid attributes aren't translated. + If error recovery is ever testable then "foobar" should be + translated. */ +/* { dg-do compile } + { dg-require-iconv "IBM1047" } +*/ +int foo __attribute__ ((walrus)); /* { dg-error "walrus" "ignored" } */ +char x[] = "foobar";
attribute2.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: string.c =================================================================== --- string.c (nonexistent) +++ string.c (revision 154) @@ -0,0 +1,5 @@ +/* Simple character translation test. */ +/* { dg-do compile } + { dg-require-iconv "IBM1047" } + { dg-final { scan-assembler-not "string foobar" } } */ +const char* foo = "string foobar";
string.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: function.cc =================================================================== --- function.cc (nonexistent) +++ function.cc (revision 154) @@ -0,0 +1,10 @@ +/* { dg-do compile } + { dg-require-iconv "IBM1047" } + { dg-final { scan-assembler-not "\"foobar\"" } } */ + +const char *str; + +void foobar (void) +{ + str = __FUNCTION__; +} Index: extern1.cc =================================================================== --- extern1.cc (nonexistent) +++ extern1.cc (revision 154) @@ -0,0 +1,15 @@ +/* Test extern statments not being translated. */ +/* { dg-do compile } + { dg-require-iconv "IBM1047" } +*/ + +extern "C" { + + +int testbug (void) { + + return 0; + +} + +} //extern block Index: extern2.cc =================================================================== --- extern2.cc (nonexistent) +++ extern2.cc (revision 154) @@ -0,0 +1,5 @@ +/* Check that we push the declaration and then continue translation. */ +/* { dg-do compile } + { dg-require-iconv "IBM1047" } + { dg-final { scan-assembler-not "foobar" } } */ +extern "C" { const char* foo = "foobar"; } Index: extern3.cc =================================================================== --- extern3.cc (nonexistent) +++ extern3.cc (revision 154) @@ -0,0 +1,11 @@ +/* { dg-do compile } + { dg-require-iconv "IBM1047" } + { dg-final { scan-assembler-not "abcdefghijklmnopqrstuvwxyz" } } */ + +extern char *bar; + +extern void foo (void) +{ + char str[]="abcdefghijklmnopqrstuvwxyz"; + bar = str; +}

powered by: WebSVN 2.1.0

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