From a86414f3625a551945d5cdf7f770d74d7404afa3 Mon Sep 17 00:00:00 2001 From: Jeffrey A Law Date: Thu, 26 Apr 2001 20:06:25 +0000 Subject: [PATCH] initp1.C: Moved here from g++.old-deja/g++.ext. * 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 | 5 +++++ gcc/testsuite/g++.dg/special/ecos.exp | 17 +++++++++++++++++ .../g++.ext => g++.dg/special}/initp1.C | 17 ++++++++--------- 3 files changed, 30 insertions(+), 9 deletions(-) rename gcc/testsuite/{g++.old-deja/g++.ext => g++.dg/special}/initp1.C (82%) diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog index 8839c39125e..640a2d6d7d9 100644 --- a/gcc/testsuite/ChangeLog +++ b/gcc/testsuite/ChangeLog @@ -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. diff --git a/gcc/testsuite/g++.dg/special/ecos.exp b/gcc/testsuite/g++.dg/special/ecos.exp index 8d3ec90a01a..df94956c19e 100644 --- a/gcc/testsuite/g++.dg/special/ecos.exp +++ b/gcc/testsuite/g++.dg/special/ecos.exp @@ -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 diff --git a/gcc/testsuite/g++.old-deja/g++.ext/initp1.C b/gcc/testsuite/g++.dg/special/initp1.C similarity index 82% rename from gcc/testsuite/g++.old-deja/g++.ext/initp1.C rename to gcc/testsuite/g++.dg/special/initp1.C index 0e4c02c3c0d..74bcb5f764d 100644 --- a/gcc/testsuite/g++.old-deja/g++.ext/initp1.C +++ b/gcc/testsuite/g++.dg/special/initp1.C @@ -1,6 +1,5 @@ -// Test for proper handling of the init_priority attribute. -// Contributed by Hugo Tyson -// excess errors test - XFAIL mips*-sgi-irix* +/* { dg-do run } */ +#include 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); } -- 2.30.2