committed: fix gcc.dg/tree-ssa/ssa-fre-4.c for CRIS and MMIX

Hans-Peter Nilsson hans-peter.nilsson@axis.com
Sun Sep 9 23:59:00 GMT 2007


Beware that TARGET_PROMOTE_PROTOTYPES is consulted during C
tree-building(!), while seemingly related macros such as
PROMOTE_MODE, TARGET_PROMOTE_FUNCTION_ARGS and
TARGET_PROMOTE_FUNCTION_RETURN aren't consulted until RTL is
created.  Hence they have no effect on the result of this
test-case.

A specific target-selector (check_effective_target_* function)
would seem better, but I don't know of a better way to implement
that than using the same target tuple list, and I don't think
that selector is of much use elsewhere.

Targets that I suggest to be added to the list are for example
alpha-*-*, avr-*-*, frv-*-*, powerpc-*-*, rs6000-*-*, m32c-*-*
pdp11-*-* mc68hc11-*-*, s390-*-*, sparc64-*-* (not an exhaustive
or necessarily correct list) but I also suggest this is better
done by the maintainers themselves when they run the test-suite.
Perhaps they want to revisit those target macros.

Committed.

gcc/testsuite:
	* gcc.dg/tree-ssa/ssa-fre-4.c: Skip for cris-*-* and mmix-*-*.

Index: ssa-fre-4.c
===================================================================
--- ssa-fre-4.c	(revision 128224)
+++ ssa-fre-4.c	(working copy)
@@ -1,4 +1,7 @@
 /* { dg-do compile } */
+/* If the target returns false for TARGET_PROMOTE_PROTOTYPES, then there
+   will be no casts for FRE to eliminate and the test will fail.  */
+/* { dg-skip-if "no promotion to eliminate" { cris-*-* mmix-*-* } { "*" } { "" } } */
 /* { dg-options "-O -fdump-tree-fre-details" } */
 
 /* From PR21608.  */

brgds, H-P



More information about the Gcc-patches mailing list