diff mbox

Go patch committed: Don't let middle-end clear flag_errno_math

Message ID mcrhbces99s.fsf@google.com
State New
Headers show

Commit Message

Ian Lance Taylor Feb. 8, 2011, 5:53 p.m. UTC
This patch to the Go frontend takes advantage of the options handling
patch I just committed to not let the middle-end clear flag_errno_math.
While looking at this code I noticed that we should not be clearing
flag_trapping_math; we do normally want floating point operations to
trap in Go.  Bootstrapped and ran Go testsuite on
x86_64-unknown-linux-gnu.  Committed to mainline.

Ian


2011-02-08  Ian Lance Taylor  <iant@google.com>

	* go-lang.c (go_langhook_init_options_struct): Set
	frontend_set_flag_errno_math.  Don't set x_flag_trapping_math.
diff mbox

Patch

Index: go/go-lang.c
===================================================================
--- go/go-lang.c	(revision 169848)
+++ go/go-lang.c	(working copy)
@@ -149,9 +149,7 @@  go_langhook_init_options_struct (struct 
 
   /* The builtin math functions should not set errno.  */
   opts->x_flag_errno_math = 0;
-
-  /* By default assume that floating point math does not trap.  */
-  opts->x_flag_trapping_math = 0;
+  opts->frontend_set_flag_errno_math = true;
 
   /* We turn on stack splitting if we can.  */
   if (targetm.supports_split_stack (false, opts))