]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
initp1.C: Moved here from g++.old-deja/g++.ext.
authorJeffrey A Law <law@cygnus.com>
Thu, 26 Apr 2001 20:06:25 +0000 (20:06 +0000)
committerJeff Law <law@gcc.gnu.org>
Thu, 26 Apr 2001 20:06:25 +0000 (14:06 -0600)
        * g++.dg/special/initp1.C: Moved here from g++.old-deja/g++.ext.
        Tweak slightly to work with g++.dg framework.
        * g++.dg/special/ecos.exp: Run initp1.C test.
        * g++.old-deja/g++.ext/initp1.C: Moved to g++.dg/special.

From-SVN: r41610

gcc/testsuite/ChangeLog
gcc/testsuite/g++.dg/special/ecos.exp
gcc/testsuite/g++.dg/special/initp1.C [moved from gcc/testsuite/g++.old-deja/g++.ext/initp1.C with 82% similarity]

index 8839c39125e751f80ac141a63cf4095dae75d267..640a2d6d7d96a070afec6504e2fe4dfa4c2a5a97 100644 (file)
@@ -1,5 +1,10 @@
 Thu Apr 26 11:15:12 2001  Jeffrey A Law  (law@cygnus.com)
 
+       * g++.dg/special/initp1.C: Moved here from g++.old-deja/g++.ext.
+       Tweak slightly to work with g++.dg framework.
+       * g++.dg/special/ecos.exp: Run initp1.C test.
+       * g++.old-deja/g++.ext/initp1.C: Moved to g++.dg/special.
+
        * g++.old-deja/g++.ext/instantiate2.C: XFAIL for HPUX too since
        its linker doesn't give line numbers either.
        * g++.old-deja/g++.ext/instantiate3.C: Similarly.
index 8d3ec90a01aa2adf3cadb588b2d99bb881a7909e..df94956c19edd0b19607a64e88879aa890c02c2d 100644 (file)
@@ -84,5 +84,22 @@ if [string match "*init_priority*" $lines] then {
 }
 dg-finish
 
+###########
+# initp1.C
+###########
+
+dg-init
+set lines [g++_target_compile "$srcdir/$subdir/initp1.C" "$objdir/a.out" executable ""]
+if [string match "*init_priority*" $lines] then {
+    xfail "initp1.C"
+    file delete $objdir/a.out
+} elseif ![string match "" $lines] then {
+    fail "initp1.C"
+} else {
+    dg-runtest "$srcdir/$subdir/conpr-1.C" "" "" 
+    file delete $objdir/a.out
+}
+dg-finish
+
 
 ### EOF ecos.exp
similarity index 82%
rename from gcc/testsuite/g++.old-deja/g++.ext/initp1.C
rename to gcc/testsuite/g++.dg/special/initp1.C
index 0e4c02c3c0d1511929f8ec16e3dc75ca2566911e..74bcb5f764d1ad5726a321b144d59b46927c8da7 100644 (file)
@@ -1,6 +1,5 @@
-// Test for proper handling of the init_priority attribute.
-// Contributed by Hugo Tyson <hmt@cygnus.co.uk>
-// excess errors test - XFAIL mips*-sgi-irix*
+/* { dg-do run } */
+#include <stdlib.h>
 
 class Two {
 private:
@@ -63,13 +62,13 @@ int main()
     X( koo[0].kay() );
     X( koo[1].kay() );
     X( koo[2].kay() );
-    if ( 0x3f != x ) return 1;
+    if ( 0x3f != x ) abort ();
 
     X( foo.kay() );
-    if ( 0x7f != x ) return 1;
+    if ( 0x7f != x ) abort ();
 
     X( goo.kay() );
-    if ( 0xff != x ) return 1;
+    if ( 0xff != x ) abort ();
 
     X( xoo[0].kay() );
     X( xoo[1].kay() );
@@ -77,7 +76,7 @@ int main()
     X( zoo[0].kay() );
     X( zoo[1].kay() );
     X( zoo[2].kay() );
-    if ( 0x3fff != x ) return 1;
+    if ( 0x3fff != x ) abort ();
 
     X( doo[0].kay() );
     X( doo[1].kay() );
@@ -85,7 +84,7 @@ int main()
     X( hoo[0].kay() );
     X( hoo[1].kay() );
     X( hoo[2].kay() );
-    if ( 0xfffff != x ) return 1;
+    if ( 0xfffff != x ) abort ();
 
-    return 0;
+    exit (0);
 }