diff mbox

[testsuite] : target-supports.exp: Disable -fprofile-generate for AVR

Message ID 4E145F35.9070005@gjlay.de
State New
Headers show

Commit Message

Georg-Johann Lay July 6, 2011, 1:12 p.m. UTC
AVR tests will fail if -fprofile-generate is given because that is not
(yet) implemented.

CCed avr port maintainer in the case they have objections.

Ok to commit?

Johann

	* lib/target-supports.exp (check_profiling_available): Disable
	profiling with -fprofile-generate for target avr.

Comments

Rainer Orth July 6, 2011, 1:26 p.m. UTC | #1
Georg-Johann Lay <avr@gjlay.de> writes:

> Index: lib/target-supports.exp
> ===================================================================
> --- lib/target-supports.exp	(revision 175811)
> +++ lib/target-supports.exp	(working copy)
> @@ -497,6 +497,13 @@ proc check_profiling_available { test_wh
>  
>      # Tree profiling requires TLS runtime support.
>      if { $test_what == "-fprofile-generate" } {
> +	# Target AVR does not support profile generation because
          ^ Leave out the `Target'

> +	# it does not implement needed support functions.
> +	# A call to check_effective_target_tls_runtime won't
> +	# reveal that.

Omit the second sentence: it isn't supposed to, but just documents a
general requirement of -fprofile-generate.

> +	if { [istarget avr-*-*] } {
> +	    return 0
> +	}
>  	return [check_effective_target_tls_runtime]
>      }

> Index: gcc.dg/tree-ssa/vrp51.c
> ===================================================================
> --- gcc.dg/tree-ssa/vrp51.c	(revision 175811)
> +++ gcc.dg/tree-ssa/vrp51.c	(working copy)
> @@ -1,6 +1,7 @@
>  /* PR tree-optimization/28632 */
>  /* { dg-do compile } */
>  /* { dg-options "-O2 -ftree-vrp" } */
> +/* { dg-require-effective-target int32plus } */
>  
>  void
>  v4 (unsigned a, unsigned b)

This is completely unrelated to the first; please don't mix such patches
in one post.

Thanks.
        Rainer
diff mbox

Patch

Index: lib/target-supports.exp
===================================================================
--- lib/target-supports.exp	(revision 175811)
+++ lib/target-supports.exp	(working copy)
@@ -497,6 +497,13 @@  proc check_profiling_available { test_wh
 
     # Tree profiling requires TLS runtime support.
     if { $test_what == "-fprofile-generate" } {
+	# Target AVR does not support profile generation because
+	# it does not implement needed support functions.
+	# A call to check_effective_target_tls_runtime won't
+	# reveal that.
+	if { [istarget avr-*-*] } {
+	    return 0
+	}
 	return [check_effective_target_tls_runtime]
     }
 
Index: gcc.dg/tree-ssa/vrp51.c
===================================================================
--- gcc.dg/tree-ssa/vrp51.c	(revision 175811)
+++ gcc.dg/tree-ssa/vrp51.c	(working copy)
@@ -1,6 +1,7 @@ 
 /* PR tree-optimization/28632 */
 /* { dg-do compile } */
 /* { dg-options "-O2 -ftree-vrp" } */
+/* { dg-require-effective-target int32plus } */
 
 void
 v4 (unsigned a, unsigned b)