This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[PATCH]: MPC cleanup in testsuite


This patch removes gunk from the testsuite that was necessary only
while MPC was optional.  It depends on this patch to require MPC:
http://gcc.gnu.org/ml/gcc-patches/2009-11/msg00731.html

Tested on x86_64-unknown-linux-gnu, no regressions.

Okay for mainline once the above patch goes in?

		Thanks,
		--Kaveh


2009-11-14  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>

	* gcc.dg/torture/builtin-math-6.c: Assume we have MPC.
	* gcc.dg/torture/builtin-math-7.c: Likewise.
	* gfortran.dg/complex_intrinsic_7.f90: Likewise.
	* gfortran.dg/complex_intrinsic_8.f90: Likewise.
	* gfortran.dg/integer_exponentiation_4.f90: Re-enable some tests.
	* lib/target-supports.exp (check_effective_target_mpc,
	check_effective_target_mpc_pow, check_effective_target_mpc_arc):
	Delete.

diff -rup orig/egcc-SVN20091114/gcc/testsuite/gcc.dg/torture/builtin-math-6.c egcc-SVN20091114/gcc/testsuite/gcc.dg/torture/builtin-math-6.c
--- orig/egcc-SVN20091114/gcc/testsuite/gcc.dg/torture/builtin-math-6.c	2009-10-14 03:40:36.000000000 +0200
+++ egcc-SVN20091114/gcc/testsuite/gcc.dg/torture/builtin-math-6.c	2009-11-14 22:53:55.000000000 +0100
@@ -6,7 +6,6 @@
    Origin: Kaveh R. Ghazi,  January 28, 2009.  */

 /* { dg-do link } */
-/* { dg-require-effective-target mpc_arc } */

 /* All references to link_error should go away at compile-time.  The
    first number is the line number and the second is the value number
diff -rup orig/egcc-SVN20091114/gcc/testsuite/gcc.dg/torture/builtin-math-7.c egcc-SVN20091114/gcc/testsuite/gcc.dg/torture/builtin-math-7.c
--- orig/egcc-SVN20091114/gcc/testsuite/gcc.dg/torture/builtin-math-7.c	2009-09-25 02:00:40.000000000 +0200
+++ egcc-SVN20091114/gcc/testsuite/gcc.dg/torture/builtin-math-7.c	2009-11-14 22:55:10.000000000 +0100
@@ -5,7 +5,6 @@
    Origin: Kaveh R. Ghazi,  August 13, 2009.  */

 /* { dg-do run } */
-/* { dg-require-effective-target mpc_pow } */
 /* { dg-add-options ieee } */

 extern void link_error(int);
diff -rup orig/egcc-SVN20091114/gcc/testsuite/gfortran.dg/complex_intrinsic_7.f90 egcc-SVN20091114/gcc/testsuite/gfortran.dg/complex_intrinsic_7.f90
--- orig/egcc-SVN20091114/gcc/testsuite/gfortran.dg/complex_intrinsic_7.f90	2009-07-26 02:00:40.000000000 +0200
+++ egcc-SVN20091114/gcc/testsuite/gfortran.dg/complex_intrinsic_7.f90	2009-11-14 22:54:32.000000000 +0100
@@ -1,5 +1,4 @@
 ! { dg-do compile }
-! { dg-require-effective-target mpc }
 ! { dg-options "-fdump-tree-original" }
 !
 ! PR fortran/33197
diff -rup orig/egcc-SVN20091114/gcc/testsuite/gfortran.dg/complex_intrinsic_8.f90 egcc-SVN20091114/gcc/testsuite/gfortran.dg/complex_intrinsic_8.f90
--- orig/egcc-SVN20091114/gcc/testsuite/gfortran.dg/complex_intrinsic_8.f90	2009-10-14 03:40:36.000000000 +0200
+++ egcc-SVN20091114/gcc/testsuite/gfortran.dg/complex_intrinsic_8.f90	2009-11-14 22:55:23.000000000 +0100
@@ -1,5 +1,4 @@
 ! { dg-do link }
-! { dg-require-effective-target mpc_arc }
 !
 ! PR fortran/33197
 !
diff -rup orig/egcc-SVN20091114/gcc/testsuite/gfortran.dg/integer_exponentiation_4.f90 egcc-SVN20091114/gcc/testsuite/gfortran.dg/integer_exponentiation_4.f90
--- orig/egcc-SVN20091114/gcc/testsuite/gfortran.dg/integer_exponentiation_4.f90	2009-06-29 02:00:40.000000000 +0200
+++ egcc-SVN20091114/gcc/testsuite/gfortran.dg/integer_exponentiation_4.f90	2009-11-14 22:56:33.000000000 +0100
@@ -38,10 +38,9 @@ program test
   print *, nearest(1.0,-1.0)**(-huge(0)) ! { dg-error "Arithmetic overflow" }

 !!!!!! COMPLEX BASE !!!!!!
-! Put these lines back in (and "no-" -> "dg-") prior to gcc-4.5.
-!  print *, (2.0,-4.3)**huge(0) ! { no-error "Arithmetic overflow" }
-!  print *, (2.0,-4.3)**huge(0_8) ! { no-error "Arithmetic overflow" }
-!  print *, (2.0,-4.3)**(-huge(0))
-!  print *, (2.0,-4.3)**(-huge(0_8))
+  print *, (2.0,-4.3)**huge(0) ! { dg-error "Arithmetic overflow" }
+  print *, (2.0,-4.3)**huge(0_8) ! { dg-error "Arithmetic overflow" }
+  print *, (2.0,-4.3)**(-huge(0))
+  print *, (2.0,-4.3)**(-huge(0_8))

 end program test
diff -rup orig/egcc-SVN20091114/gcc/testsuite/lib/target-supports.exp egcc-SVN20091114/gcc/testsuite/lib/target-supports.exp
--- orig/egcc-SVN20091114/gcc/testsuite/lib/target-supports.exp	2009-11-12 02:00:58.000000000 +0100
+++ egcc-SVN20091114/gcc/testsuite/lib/target-supports.exp	2009-11-14 22:53:27.000000000 +0100
@@ -3138,55 +3138,6 @@ proc check_effective_target_lto { } {
     return [info exists ENABLE_LTO]
 }

-# Return 1 if the MPC library is integrated with GCC, 0 otherwise.
-
-proc check_effective_target_mpc { } {
-    return [check_no_compiler_messages mpc executable {
-	extern void link_error(void);
-	int main ()
-	{
-	  if (__builtin_csin(0) != 0)
-	    link_error();
-	}
-    }]
-}
-
-# Return 1 if the MPC library with mpc_pow is integrated with GCC, 0 otherwise.
-
-proc check_effective_target_mpc_pow { } {
-    return [check_no_compiler_messages mpc_pow executable {
-	extern void link_error(void);
-	int main ()
-	{
-	  if (__builtin_cpow(1,1) != 1)
-	    link_error();
-	}
-    }]
-}
-
-# Return 1 if the MPC library with "arc" functions is integrated with GCC, 0 otherwise.
-
-proc check_effective_target_mpc_arc { } {
-    return [check_no_compiler_messages mpc_arc executable {
-	extern void link_error(void);
-	int main ()
-	{
-	  if (__builtin_cacos(1) != 0)
-	    link_error();
-	  if (__builtin_casin(0) != 0)
-	    link_error();
-	  if (__builtin_catan(0) != 0)
-	    link_error();
-	  if (__builtin_cacosh(1) != 0)
-	    link_error();
-	  if (__builtin_casinh(0) != 0)
-	    link_error();
-	  if (__builtin_catanh(0) != 0)
-	    link_error();
-	}
-    }]
-}
-
 # Return 1 if the language for the compiler under test is C.

 proc check_effective_target_c { } {


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]