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

Subversion Repositories openrisc

Compare Revisions

  • This comparison shows the changes necessary to convert path
    /openrisc/tags/gnu-src/gcc-4.5.1/gcc-4.5.1-or32-1.0rc1/gcc/testsuite/gcc.dg/pch
    from Rev 298 to Rev 338
    Reverse comparison

Rev 298 → Rev 338

/valid-1b.c
0,0 → 1,5
/* { dg-options "-I. -Winvalid-pch -g0" } */
 
#include "valid-1b.h"
 
int x;
valid-1b.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: macro-2.c =================================================================== --- macro-2.c (nonexistent) +++ macro-2.c (revision 338) @@ -0,0 +1,8 @@ +#define DEFINED_VALUE_2 3 + +#include "macro-2.h" + +int main(void) +{ + return DEFINED_VALUE - DEFINED_VALUE_2; +}
macro-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: decl-5.hs =================================================================== --- decl-5.hs (nonexistent) +++ decl-5.hs (revision 338) @@ -0,0 +1 @@ +extern int foo(void); Index: macro-4.c =================================================================== --- macro-4.c (nonexistent) +++ macro-4.c (revision 338) @@ -0,0 +1,8 @@ +#define DEFN aa + bb + +#include "macro-4.h" + +int foo(int aa, int bb) +{ + return DEFN; +}
macro-4.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: decl-1.c =================================================================== --- decl-1.c (nonexistent) +++ decl-1.c (revision 338) @@ -0,0 +1,2 @@ +#include "decl-1.h" +int main(void) { return foo; }
decl-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: inline-3.hs =================================================================== --- inline-3.hs (nonexistent) +++ inline-3.hs (revision 338) @@ -0,0 +1,7 @@ +extern double rint(double); +extern double fmod (double, double); +static inline unsigned foo(double d) { + double a; + a = rint(d); + return (unsigned)(fmod(a, (double)0xFFFFFFFF) + ((d - a) * 0xFFFFFFFF)); +} Index: decl-3.c =================================================================== --- decl-3.c (nonexistent) +++ decl-3.c (revision 338) @@ -0,0 +1,11 @@ +#include "decl-3.h" + +foo_p bar (void) +{ + return foop; +} + +struct foo *bar2 (void) +{ + return foop; +}
decl-3.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: counter-3.hs =================================================================== --- counter-3.hs (nonexistent) +++ counter-3.hs (revision 338) @@ -0,0 +1,4 @@ +/* Copyright (C) 2007 Free Software Foundation + Contributed by Ollie Wild */ + +#define counter __COUNTER__ Index: import-1.c =================================================================== --- import-1.c (nonexistent) +++ import-1.c (revision 338) @@ -0,0 +1,21 @@ +/* { dg-options "-I. -I $srcdir/gcc.dg/pch -Wno-deprecated" } */ +#include "import-1.h" +#include "import-1a.h" +#import "import-1b.h" +#include "import-1c.h" + +#ifndef IMPORT_1A +IMPORT_1A not defined +#endif + +#ifndef IMPORT_1B +IMPORT_1B not defined +#endif + +#ifndef IMPORT_1C +IMPORT_1C not defined +#endif + +#ifndef IMPORT_1 +IMPORT_1 not defined +#endif
import-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: decl-5.c =================================================================== --- decl-5.c (nonexistent) +++ decl-5.c (revision 338) @@ -0,0 +1,2 @@ +#include "decl-5.h" +static int (*t)(void) = foo;
decl-5.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: cpp-2.hs =================================================================== --- cpp-2.hs (nonexistent) +++ cpp-2.hs (revision 338) @@ -0,0 +1 @@ +/* Empty. */ Index: save-temps-1.hs =================================================================== --- save-temps-1.hs (nonexistent) +++ save-temps-1.hs (revision 338) @@ -0,0 +1,5 @@ +#define T 123 +int foo (void) +{ + return 3; +} Index: static-2.hs =================================================================== --- static-2.hs (nonexistent) +++ static-2.hs (revision 338) @@ -0,0 +1,5 @@ +static int foo(void) +{ + static int counter; + return counter++; +} Index: counter-2.c =================================================================== --- counter-2.c (nonexistent) +++ counter-2.c (revision 338) @@ -0,0 +1,18 @@ +/* Copyright (C) 2007 Free Software Foundation + Contributed by Ollie Wild */ + +/* { dg-options "-I. -Winvalid-pch" } */ + +#if __COUNTER__ != 0 +#error __COUNTER__ != 0 +#endif + +#include "counter-2.h" /* { dg-warning "not used because `__COUNTER__' is invalid" } */ +/* { dg-error "counter-2.h: No such file or directory" "no such file" { target *-*-* } 0 } */ +/* { dg-error "one or more PCH files were found, but they were invalid" "invalid files" { target *-*-* } 10 } */ +/* { dg-message "terminated" "" { target *-*-* } 0 } */ + +int main(void) +{ + return __COUNTER__; +}
counter-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: import-1b.h =================================================================== --- import-1b.h (nonexistent) +++ import-1b.h (revision 338) @@ -0,0 +1,4 @@ +#ifdef IMPORT_1B +#error import-1b failure +#endif +#define IMPORT_1B
import-1b.h 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: cpp-2.c =================================================================== --- cpp-2.c (nonexistent) +++ cpp-2.c (revision 338) @@ -0,0 +1,4 @@ +/* { dg-options "-Wunknown-pragmas -I." } */ +#include "cpp-2.h" +#pragma GCC poison not_used +
cpp-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: system-1.c =================================================================== --- system-1.c (nonexistent) +++ system-1.c (revision 338) @@ -0,0 +1,6 @@ +#include "system-1.h" +int main(void) +{ + puts ("hello world!"); + exit (0); +}
system-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: pch.exp =================================================================== --- pch.exp (nonexistent) +++ pch.exp (revision 338) @@ -0,0 +1,63 @@ +# Copyright (C) 1997, 2002, 2003, 2007, 2009 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 for precompiled header interaction, +# that uses the `dg.exp' driver. + +# Load support procs. +load_lib gcc-dg.exp +load_lib dg-pch.exp +load_lib torture-options.exp + +# Initialize `dg'. +dg-init +torture-init +set-torture-options $DG_TORTURE_OPTIONS + +set old_dg_do_what_default "${dg-do-what-default}" + +# Main loop. +foreach test [lsort [glob -nocomplain $srcdir/$subdir/*.c]] { + global torture_without_loops + + # We don't try to use the loop-optimizing options, since they are highly + # unlikely to make any difference to PCH. However, we do want to + # add -O0 -g, since users who want PCH usually want debugging and quick + # compiles. + dg-pch $subdir $test [concat [list {-O0 -g}] $torture_without_loops] ".h" +} + +set test "largefile.c" +set testh "largefile.hs" +set f [open $test w] +puts $f "/* { dg-timeout-factor 4.0 } */" +set v 0 +for { set v 0 } { $v < 10000 } { incr v } { + puts $f "#define MACRO_${v} \"1234567890\" \"$v\"" +} +puts $f "#include \"largefile.h\"" +close $f +set f [open $testh w] +close $f +dg-pch $subdir $test [concat [list {-O0 -g}] $torture_without_loops] ".h" +file delete $test +file delete $testh + +set dg-do-what-default "$old_dg_do_what_default" + +# All done. +torture-finish +dg-finish Index: cpp-3b.h =================================================================== --- cpp-3b.h (nonexistent) +++ cpp-3b.h (revision 338) @@ -0,0 +1,4 @@ +#ifndef CPP_3B_H +#define CPP_3B_H +/* empty */ +#endif
cpp-3b.h 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: macro-4.hs =================================================================== --- macro-4.hs (nonexistent) +++ macro-4.hs (revision 338) @@ -0,0 +1 @@ +/* No content! */ Index: warn-1.hs =================================================================== --- warn-1.hs (nonexistent) +++ warn-1.hs (revision 338) @@ -0,0 +1,5 @@ +enum { + DEFINED_VALUE +}; + + Index: empty.c =================================================================== --- empty.c (nonexistent) +++ empty.c (revision 338) @@ -0,0 +1,8 @@ +/* Yes, it's called "empty" because it has no contents at all. + Even this comment goes here, rather than in empty.h. */ +#include "empty.h" + +int main(void) +{ + return 0; +}
empty.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: valid-2.c =================================================================== --- valid-2.c (nonexistent) +++ valid-2.c (revision 338) @@ -0,0 +1,7 @@ +/* { dg-options "-I. -Winvalid-pch -fexceptions" } */ + +#include "valid-2.h" /* { dg-warning "settings for -fexceptions do not match" } */ +/* { dg-error "No such file" "no such file" { target *-*-* } 0 } */ +/* { dg-error "they were invalid" "invalid files" { target *-*-* } 0 } */ +/* { dg-message "terminated" "" { target *-*-* } 0 } */ +int x;
valid-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: decl-4.hs =================================================================== --- decl-4.hs (nonexistent) +++ decl-4.hs (revision 338) @@ -0,0 +1,7 @@ +typedef struct foo { + int a; + char b; + struct foo *c; +} foo_s; +typedef struct foo *foo_p; +extern foo_p foop; Index: valid-4.c =================================================================== --- valid-4.c (nonexistent) +++ valid-4.c (revision 338) @@ -0,0 +1,6 @@ +/* { dg-options "-I. -Winvalid-pch -Wtrigraphs" } */ + +#include "valid-4.h" + +char * x = "??/"; /* { dg-warning "trigraph" } */ +
valid-4.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: include/import-2a.h =================================================================== --- include/import-2a.h (nonexistent) +++ include/import-2a.h (revision 338) @@ -0,0 +1 @@ +#import "import-2b.h"
include/import-2a.h 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: include/import-2b.h =================================================================== --- include/import-2b.h (nonexistent) +++ include/import-2b.h (revision 338) @@ -0,0 +1 @@ +int dup = 9;
include/import-2b.h 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: valid-6.c =================================================================== --- valid-6.c (nonexistent) +++ valid-6.c (revision 338) @@ -0,0 +1,5 @@ +/* { dg-options "-I. -Winvalid-pch -dH -pipe -fcond-mismatch" } */ + +#include "valid-6.h" + +int x;
valid-6.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: inline-2.hs =================================================================== --- inline-2.hs (nonexistent) +++ inline-2.hs (revision 338) @@ -0,0 +1,5 @@ +extern inline const char * +foo(int a) +{ + return "abcdefgh"+a; +} Index: warn-1.c =================================================================== --- warn-1.c (nonexistent) +++ warn-1.c (revision 338) @@ -0,0 +1,14 @@ +/* { dg-options "-I. -Winvalid-pch" } */ + +#define DEFINED_VALUE 3 + +#include "warn-1.h"/* { dg-warning "not used because .DEFINED_VALUE. is defined" } */ +/* { dg-error "No such file" "no such file" { target *-*-* } 0 } */ +/* { dg-error "they were invalid" "invalid files" { target *-*-* } 0 } */ +/* { dg-message "terminated" "" { target *-*-* } 0 } */ + + +int main(void) +{ + return DEFINED_VALUE; +}
warn-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: counter-2.hs =================================================================== --- counter-2.hs (nonexistent) +++ counter-2.hs (revision 338) @@ -0,0 +1,4 @@ +/* Copyright (C) 2007 Free Software Foundation + Contributed by Ollie Wild */ + +static int i = __COUNTER__; Index: cpp-1.hs =================================================================== --- cpp-1.hs (nonexistent) +++ cpp-1.hs (revision 338) @@ -0,0 +1 @@ +/* Empty. */ Index: system-1.hs =================================================================== --- system-1.hs (nonexistent) +++ system-1.hs (revision 338) @@ -0,0 +1,2 @@ +#include +#include Index: inline-2.c =================================================================== --- inline-2.c (nonexistent) +++ inline-2.c (revision 338) @@ -0,0 +1,12 @@ +#include "inline-2.h" +extern inline char +bar(int a) +{ + return foo(a)[0]; +} + +extern inline char +baz(void) +{ + return foo(0)[0]; +}
inline-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: static-1.hs =================================================================== --- static-1.hs (nonexistent) +++ static-1.hs (revision 338) @@ -0,0 +1,5 @@ +static int foo(void) +{ + static int counter; + return counter++; +} Index: inline-4.c =================================================================== --- inline-4.c (nonexistent) +++ inline-4.c (revision 338) @@ -0,0 +1,6 @@ +#include "inline-4.h" +extern int printf (const char *, ...); +int main(void) { + printf (getstring()); + return 0; +}
inline-4.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: struct-1.c =================================================================== --- struct-1.c (nonexistent) +++ struct-1.c (revision 338) @@ -0,0 +1,16 @@ +#include "struct-1.h" + +struct ChainSearchRecord { + int identity; +}; +typedef struct ChainSearchRecord ChainSearchRecord; +void foo (ChainSearchPtr s) +{ +#if(__SIZEOF_INT__ >= 4) + s->identity = 0x6a73616d; +#else + s->identity = 0x616d; +#endif +} + +
struct-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: pushpop-1.hs =================================================================== --- pushpop-1.hs (nonexistent) +++ pushpop-1.hs (revision 338) @@ -0,0 +1,5 @@ +#define FOO 1 +#pragma push_macro ("FOO") +#undef FOO +#define FOO 2 + Index: static-1.c =================================================================== --- static-1.c (nonexistent) +++ static-1.c (revision 338) @@ -0,0 +1,6 @@ +#include "static-1.h" +static int bar(void) +{ + static int counter; + return counter++; +}
static-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: valid-2.hs =================================================================== --- valid-2.hs (nonexistent) +++ valid-2.hs (revision 338) @@ -0,0 +1 @@ +extern int x; Index: empty.hs =================================================================== Index: common-1.c =================================================================== --- common-1.c (nonexistent) +++ common-1.c (revision 338) @@ -0,0 +1,3 @@ +#include "common-1.h" +int foo2 = 3; +int zz = 2;
common-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: valid-1b.hs =================================================================== --- valid-1b.hs (nonexistent) +++ valid-1b.hs (revision 338) @@ -0,0 +1,3 @@ +/* { dg-options "-I. -Winvalid-pch -g" } */ + +extern int x; Index: static-3.c =================================================================== --- static-3.c (nonexistent) +++ static-3.c (revision 338) @@ -0,0 +1,8 @@ +#include "static-3.h" +int bar(int *a) +{ + int i, tot; + for (i = tot = 0; i < 100; i++) + tot += a[i]; + return tot; +}
static-3.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: macro-3.hs =================================================================== --- macro-3.hs (nonexistent) +++ macro-3.hs (revision 338) @@ -0,0 +1,2 @@ +#define DEFINED_FUNC(x) 3 - (x) + Index: valid-6.hs =================================================================== --- valid-6.hs (nonexistent) +++ valid-6.hs (revision 338) @@ -0,0 +1 @@ +extern int x; Index: decl-3.hs =================================================================== --- decl-3.hs (nonexistent) +++ decl-3.hs (revision 338) @@ -0,0 +1,3 @@ +struct foo; +typedef struct foo *foo_p; +extern foo_p foop; Index: macro-1.c =================================================================== --- macro-1.c (nonexistent) +++ macro-1.c (revision 338) @@ -0,0 +1,6 @@ +#include "macro-1.h" + +int main(void) +{ + return DEFINED_VALUE + 1 - DEFINED_PARAM (3); +}
macro-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: import-2.hs =================================================================== --- import-2.hs (nonexistent) +++ import-2.hs (revision 338) @@ -0,0 +1,4 @@ +/* { dg-options "-I $srcdir/gcc.dg/pch/include -Wno-deprecated" } */ + +#import "import-2b.h" +#import "import-2a.h" Index: macro-3.c =================================================================== --- macro-3.c (nonexistent) +++ macro-3.c (revision 338) @@ -0,0 +1,8 @@ +#define DEFINED_FUNC_2(x) (3 + (x)) + +#include "macro-3.h" + +int main(void) +{ + return DEFINED_FUNC (1) - DEFINED_FUNC_2 (-1); +}
macro-3.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: inline-1.hs =================================================================== --- inline-1.hs (nonexistent) +++ inline-1.hs (revision 338) @@ -0,0 +1,5 @@ +extern inline int +foo(int a) +{ + return a * 2 + 1; +} Index: counter-1.hs =================================================================== --- counter-1.hs (nonexistent) +++ counter-1.hs (revision 338) @@ -0,0 +1,5 @@ +/* Copyright (C) 2007 Free Software Foundation + Contributed by Ollie Wild */ + +static unsigned offset[] = {__COUNTER__, __COUNTER__, __COUNTER__}; +#define counter __COUNTER__ Index: decl-2.c =================================================================== --- decl-2.c (nonexistent) +++ decl-2.c (revision 338) @@ -0,0 +1,2 @@ +#include "decl-2.h" +int main(void) { return fun (1, 2); }
decl-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: decl-4.c =================================================================== --- decl-4.c (nonexistent) +++ decl-4.c (revision 338) @@ -0,0 +1,9 @@ +#include "decl-4.h" + +int bar (foo_p f) +{ + if (f->a + foop->a) + return f->c->b + foop->b; + else + return foop->c->b + f->a; +}
decl-4.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: import-2.c =================================================================== --- import-2.c (nonexistent) +++ import-2.c (revision 338) @@ -0,0 +1,8 @@ +/* { dg-options "-I. -I $srcdir/gcc.dg/pch/include -Wno-deprecated" } */ + +#include "import-2.h" +#import "import-2b.h" + +int main(int argc, char **argv) { + return 0; +}
import-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: struct-1.hs =================================================================== --- struct-1.hs (nonexistent) +++ struct-1.hs (revision 338) @@ -0,0 +1,3 @@ +struct ChainSearchRecord; +typedef struct ChainSearchRecord *ChainSearchPtr; + Index: counter-1.c =================================================================== --- counter-1.c (nonexistent) +++ counter-1.c (revision 338) @@ -0,0 +1,9 @@ +/* Copyright (C) 2007 Free Software Foundation + Contributed by Ollie Wild */ + +#include "counter-1.h" + +int main(void) +{ + return __COUNTER__; +}
counter-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: common-1.hs =================================================================== --- common-1.hs (nonexistent) +++ common-1.hs (revision 338) @@ -0,0 +1,3 @@ +static int foo1 = 9; +int foo2; +extern int zz; Index: import-1a.h =================================================================== --- import-1a.h (nonexistent) +++ import-1a.h (revision 338) @@ -0,0 +1,5 @@ +#ifdef IMPORT_1A +#error import-1a failure +#endif +#define IMPORT_1A +
import-1a.h 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: counter-3.c =================================================================== --- counter-3.c (nonexistent) +++ counter-3.c (revision 338) @@ -0,0 +1,13 @@ +/* Copyright (C) 2007 Free Software Foundation + Contributed by Ollie Wild */ + +#if __COUNTER__ != 0 +#error __COUNTER__ != 0 +#endif + +#include "counter-3.h" + +int main(void) +{ + return __COUNTER__; +}
counter-3.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: cpp-1.c =================================================================== --- cpp-1.c (nonexistent) +++ cpp-1.c (revision 338) @@ -0,0 +1,4 @@ +#include "cpp-1.h" +#if !defined(__GNUC__) +panic! panic! +#endif
cpp-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: import-1c.h =================================================================== --- import-1c.h (nonexistent) +++ import-1c.h (revision 338) @@ -0,0 +1,6 @@ +#pragma once +#ifdef IMPORT_1C +#error import-1c failure +#endif +#define IMPORT_1C +
import-1c.h 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: cpp-3.c =================================================================== --- cpp-3.c (nonexistent) +++ cpp-3.c (revision 338) @@ -0,0 +1,13 @@ +/* PR preprocessor/36649 */ +/* { dg-do compile } */ +/* { dg-options "-H -I." } */ +/* { dg-message "cpp-3.h\[^\n\]*(\n\[^\n\]*cpp-3.c)?\n\[^\n\]*cpp-3a.h\n\[^\n\]*cpp-3b.h" "" { target *-*-* } 0 } */ + +#include "cpp-3.h" +#include "cpp-3a.h" + +int +main (void) +{ + return 0; +}
cpp-3.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: valid-1.hs =================================================================== --- valid-1.hs (nonexistent) +++ valid-1.hs (revision 338) @@ -0,0 +1,3 @@ +/* { dg-options "-I. -Winvalid-pch -g0" } */ + +extern int x; Index: except-1.c =================================================================== --- except-1.c (nonexistent) +++ except-1.c (revision 338) @@ -0,0 +1,7 @@ +/* { dg-options "-fexceptions -I." } */ +#include "except-1.h" + +int main(void) +{ + return foo(1); +}
except-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: macro-2.hs =================================================================== --- macro-2.hs (nonexistent) +++ macro-2.hs (revision 338) @@ -0,0 +1,2 @@ +#define DEFINED_VALUE 3 + Index: cpp-3a.h =================================================================== --- cpp-3a.h (nonexistent) +++ cpp-3a.h (revision 338) @@ -0,0 +1,4 @@ +#ifndef CPP_3A_H +#define CPP_3A_H +#include "cpp-3b.h" +#endif
cpp-3a.h 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: valid-5.hs =================================================================== --- valid-5.hs (nonexistent) +++ valid-5.hs (revision 338) @@ -0,0 +1 @@ +extern int x; Index: pushpop-1.c =================================================================== --- pushpop-1.c (nonexistent) +++ pushpop-1.c (revision 338) @@ -0,0 +1,11 @@ +#include "pushpop-1.hs" + +#if FOO != 2 +#error FOO != 2 +#endif +#pragma pop_macro("FOO") + +#if FOO != 1 +#error FOR != 1 +#endif +
pushpop-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: valid-1.c =================================================================== --- valid-1.c (nonexistent) +++ valid-1.c (revision 338) @@ -0,0 +1,8 @@ +/* { dg-options "-I. -Winvalid-pch -g" } */ + +#include "valid-1.h"/* { dg-warning "created with -gnone, but used with -g" } */ +/* { dg-error "No such file" "no such file" { target *-*-* } 0 } */ +/* { dg-error "they were invalid" "invalid files" { target *-*-* } 0 } */ +/* { dg-message "terminated" "" { target *-*-* } 0 } */ + +int x;
valid-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: decl-2.hs =================================================================== --- decl-2.hs (nonexistent) +++ decl-2.hs (revision 338) @@ -0,0 +1,3 @@ +extern int fun (int a, int b); + + Index: global-1.c =================================================================== --- global-1.c (nonexistent) +++ global-1.c (revision 338) @@ -0,0 +1,2 @@ +#include "global-1.h" +const int bar = 3;
global-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: import-1.hs =================================================================== --- import-1.hs (nonexistent) +++ import-1.hs (revision 338) @@ -0,0 +1,5 @@ +/* { dg-options "-I. -I $srcdir/gcc.dg/pch -Wno-deprecated" } */ +#import "import-1a.h" +#include "import-1b.h" +#include "import-1c.h" +#define IMPORT_1 Index: valid-5.c =================================================================== --- valid-5.c (nonexistent) +++ valid-5.c (revision 338) @@ -0,0 +1,5 @@ +/* { dg-options "-I. -Winvalid-pch -pedantic-errors" } */ + +#include "valid-5.h" + +int x;
valid-5.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: inline-4.hs =================================================================== --- inline-4.hs (nonexistent) +++ inline-4.hs (revision 338) @@ -0,0 +1,4 @@ +static inline char *getstring(void) +{ + return "hello"; +} Index: cpp-3.hs =================================================================== --- cpp-3.hs (nonexistent) +++ cpp-3.hs (revision 338) @@ -0,0 +1,4 @@ +#ifndef CPP_3_H +#define CPP_3_H +/* empty */ +#endif Index: inline-1.c =================================================================== --- inline-1.c (nonexistent) +++ inline-1.c (revision 338) @@ -0,0 +1,10 @@ +#include "inline-1.h" +int bar(int a, int b) +{ + return foo(a) + b; +} + +int baz(void) +{ + return foo(3); +}
inline-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: inline-3.c =================================================================== --- inline-3.c (nonexistent) +++ inline-3.c (revision 338) @@ -0,0 +1,5 @@ +#include "inline-3.h" +unsigned bar(double d) +{ + foo (d); +}
inline-3.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: except-1.hs =================================================================== --- except-1.hs (nonexistent) +++ except-1.hs (revision 338) @@ -0,0 +1,6 @@ +/* { dg-options "-fexceptions" } */ +extern inline int +foo(int a) +{ + return a + 1; +} Index: static-3.hs =================================================================== --- static-3.hs (nonexistent) +++ static-3.hs (revision 338) @@ -0,0 +1,7 @@ +static int foo(int *a) +{ + int i, tot; + for (i = tot = 0; i < 100; i++) + tot += a[i]; + return tot; +} Index: save-temps-1.c =================================================================== --- save-temps-1.c (nonexistent) +++ save-temps-1.c (revision 338) @@ -0,0 +1,9 @@ +/* { dg-options "-I. -save-temps" } */ +#include "save-temps-1.h" +#ifndef T +#error T not defined +#endif +#include +int x; + +/* { dg-final { cleanup-saved-temps ".s" } } */
save-temps-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: static-2.c =================================================================== --- static-2.c (nonexistent) +++ static-2.c (revision 338) @@ -0,0 +1,6 @@ +#include "static-2.h" +int bar(void) +{ + static int counter; + return counter++; +}
static-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: global-1.hs =================================================================== --- global-1.hs (nonexistent) +++ global-1.hs (revision 338) @@ -0,0 +1 @@ +const int foo = 2; Index: macro-1.hs =================================================================== --- macro-1.hs (nonexistent) +++ macro-1.hs (revision 338) @@ -0,0 +1,2 @@ +#define DEFINED_VALUE 3 +#define DEFINED_PARAM(x) (x+1) Index: valid-4.hs =================================================================== --- valid-4.hs (nonexistent) +++ valid-4.hs (revision 338) @@ -0,0 +1 @@ +extern char * x; Index: decl-1.hs =================================================================== --- decl-1.hs (nonexistent) +++ decl-1.hs (revision 338) @@ -0,0 +1 @@ +extern int foo;

powered by: WebSVN 2.1.0

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