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/g++.dg/special
- from Rev 154 to Rev 816
- ↔ Reverse comparison
Rev 154 → Rev 816
/conpr-1.C
0,0 → 1,20
/* { dg-do run } */ |
|
#include <stdlib.h> |
|
class foo_t { |
int x; |
public: |
foo_t(void) { x=1; } |
int get(void) { return x; } |
}; |
|
static foo_t foo __attribute__((init_priority(5000))); |
|
int main(void) { |
|
if (foo.get()) |
exit(0); |
else |
abort(); |
} |
conpr-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: conpr-2.C
===================================================================
--- conpr-2.C (nonexistent)
+++ conpr-2.C (revision 816)
@@ -0,0 +1,24 @@
+/* This doesn't work on solaris2 for reasons described in PR 6482. */
+/* { dg-do run { xfail *-*-solaris2* } } */
+/* { dg-additional-sources "conpr-2a.cc" } */
+
+#include
+
+class foo_t {
+ int x;
+ static int count;
+public:
+ foo_t(void) { x=++count; }
+ int get(void) { return x; }
+};
+
+int foo_t::count;
+
+extern foo_t foo1, foo2;
+
+int main(void) {
+
+ if ( (foo1.get() != 2) || (foo2.get() != 1) )
+ abort();
+ exit(0);
+}
conpr-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: conpr-3.C
===================================================================
--- conpr-3.C (nonexistent)
+++ conpr-3.C (revision 816)
@@ -0,0 +1,23 @@
+/* { dg-do run } */
+/* { dg-additional-sources "conpr-3a.cc conpr-3b.cc" } */
+
+#include
+
+class foo_t {
+ int x;
+ static int count;
+public:
+ foo_t(void) { x=++count; }
+ int get(void) { return x; }
+};
+
+int foo_t::count;
+
+extern foo_t foo1, foo2;
+
+int main(void) {
+
+ if ( (foo1.get() != 2) || (foo2.get() != 1) )
+ abort();
+ exit(0);
+}
conpr-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: conpr-4.C
===================================================================
--- conpr-4.C (nonexistent)
+++ conpr-4.C (revision 816)
@@ -0,0 +1,23 @@
+/* { dg-do run } */
+/* { dg-additional-sources "conpr-3b.cc conpr-3a.cc" } */
+
+#include
+
+class foo_t {
+ int x;
+ static int count;
+public:
+ foo_t(void) { x=++count; }
+ int get(void) { return x; }
+};
+
+int foo_t::count;
+
+extern foo_t foo1, foo2;
+
+int main(void) {
+
+ if ( (foo1.get() != 2) || (foo2.get() != 1) )
+ abort();
+ exit(0);
+}
conpr-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: ecos.exp
===================================================================
--- ecos.exp (nonexistent)
+++ ecos.exp (revision 816)
@@ -0,0 +1,45 @@
+# Copyright (C) 1999, 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@cygnus.co.uk
+
+# This file was written by Jonathan Larmour (jlarmour@cygnus.co.uk).
+
+# G++ testsuite that uses the `dg.exp' driver.
+
+# Load support procs.
+load_lib g++-dg.exp
+
+# Test for whether or not __attribute__((init_priority)) is supported
+# by the platform.
+
+set comp_output [g++_target_compile \
+ "$srcdir/$subdir/initp1.C" "initp1.S" assembly ""]
+remove-build-file "initp1.S"
+if { [string match "*init_priority*" $comp_output] } {
+ return 0
+}
+
+# Initialize 'dg'.
+dg-init
+
+# Main loop.
+dg-runtest [lsort [glob -nocomplain $srcdir/$subdir/*.C]] "" ""
+
+# All done.
+dg-finish
+
Index: conpr-2a.cc
===================================================================
--- conpr-2a.cc (nonexistent)
+++ conpr-2a.cc (revision 816)
@@ -0,0 +1,12 @@
+/* { dg-do run } */
+
+class foo_t {
+ int x;
+ static int count;
+public:
+ foo_t(void) { x=++count; }
+ int get(void) { return x; }
+};
+
+foo_t foo1 __attribute__((init_priority(6000)));
+foo_t foo2 __attribute__((init_priority(5000)));
Index: initp1.C
===================================================================
--- initp1.C (nonexistent)
+++ initp1.C (revision 816)
@@ -0,0 +1,91 @@
+/* This doesn't work on solaris2 for reasons described in PR 6482. */
+/* { dg-do run { xfail *-*-solaris2* } } */
+#include
+
+class Two {
+private:
+ int i, j, k;
+public:
+ static int count;
+ Two( int ii, int jj ) { i = ii; j = jj; k = count++; };
+ Two( void ) { i = 0; j = 0; k = count++; };
+ int eye( void ) { return i; };
+ int jay( void ) { return j; };
+ int kay( void ) { return k; };
+};
+
+extern Two foo;
+extern Two goo;
+extern Two coo[];
+extern Two koo[];
+
+Two foo __attribute__((init_priority(1005))) ( 5, 6 );
+
+Two goo __attribute__((init_priority(1007))) = Two( 7, 8 );
+
+Two doo[ 3 ];
+
+Two hoo[ 3 ] = {
+ Two( 11, 12 ),
+ Two( 13, 14 ),
+ Two( 15, 16 )
+};
+
+Two coo[ 3 ] __attribute__((init_priority(1000)));
+
+Two koo[ 3 ] __attribute__((init_priority(1000))) = {
+ Two( 21, 22 ),
+ Two( 23, 24 ),
+ Two( 25, 26 )
+};
+
+Two xoo[ 3 ] __attribute__((init_priority(1100)));
+
+Two zoo[ 3 ] __attribute__((init_priority(1100))) = {
+ Two( 31, 32 ),
+ Two( 33, 34 ),
+ Two( 35, 36 )
+};
+
+int Two::count;
+
+long x = 0;
+
+#define X( n ) \
+ do { if ( x & (1L << (n)) ) return 1; else x |= (1L << (n)); } while (0)
+
+int main()
+{
+
+ X( coo[0].kay() );
+ X( coo[1].kay() );
+ X( coo[2].kay() );
+ X( koo[0].kay() );
+ X( koo[1].kay() );
+ X( koo[2].kay() );
+ if ( 0x3f != x ) abort ();
+
+ X( foo.kay() );
+ if ( 0x7f != x ) abort ();
+
+ X( goo.kay() );
+ if ( 0xff != x ) abort ();
+
+ X( xoo[0].kay() );
+ X( xoo[1].kay() );
+ X( xoo[2].kay() );
+ X( zoo[0].kay() );
+ X( zoo[1].kay() );
+ X( zoo[2].kay() );
+ if ( 0x3fff != x ) abort ();
+
+ X( doo[0].kay() );
+ X( doo[1].kay() );
+ X( doo[2].kay() );
+ X( hoo[0].kay() );
+ X( hoo[1].kay() );
+ X( hoo[2].kay() );
+ if ( 0xfffff != x ) abort ();
+
+ exit (0);
+}
initp1.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: conpr-3a.cc
===================================================================
--- conpr-3a.cc (nonexistent)
+++ conpr-3a.cc (revision 816)
@@ -0,0 +1,11 @@
+/* { dg-do run } */
+
+class foo_t {
+ int x;
+ static int count;
+public:
+ foo_t(void) { x=++count; }
+ int get(void) { return x; }
+};
+
+foo_t foo1 __attribute__((init_priority(6000)));
Index: conpr-3b.cc
===================================================================
--- conpr-3b.cc (nonexistent)
+++ conpr-3b.cc (revision 816)
@@ -0,0 +1,11 @@
+/* { dg-do run } */
+
+class foo_t {
+ int x;
+ static int count;
+public:
+ foo_t(void) { x=++count; }
+ int get(void) { return x; }
+};
+
+foo_t foo2 __attribute__((init_priority(5000)));