misc.c (gnat_init_gcc_fp(): Set flag_errno_math to 0.
authorDoug Rupp <rupp@adacore.com>
Thu, 31 Jul 2014 12:54:32 +0000 (12:54 +0000)
committerArnaud Charlet <charlet@gcc.gnu.org>
Thu, 31 Jul 2014 12:54:32 +0000 (14:54 +0200)
2014-07-31  Doug Rupp  <rupp@adacore.com>

* gcc-interface/misc.c (gnat_init_gcc_fp(): Set flag_errno_math to 0.

From-SVN: r213355

gcc/ada/ChangeLog
gcc/ada/gcc-interface/misc.c

index 6b89f7f65ccf636b7c5a56d77367e674620a605d..42c927fbb5579bb95627acbbbdeeb4d22f61b8c8 100644 (file)
@@ -1,3 +1,7 @@
+2014-07-31  Doug Rupp  <rupp@adacore.com>
+
+       * gcc-interface/misc.c (gnat_init_gcc_fp(): Set flag_errno_math to 0.
+
 2014-07-31  Hristian Kirtchev  <kirtchev@adacore.com>
 
        * sem_util.adb (Is_Effectively_Volatile): New routine.
index fe44c6d5b3f15e5c934ad126f26e8b662fe94845..c2ab5f6d1060433ed7ecb317d5c90b755ea9d5fd 100644 (file)
@@ -414,6 +414,11 @@ gnat_init_gcc_fp (void)
     flag_trapping_math = 1;
   else if (!global_options_set.x_flag_trapping_math)
     flag_trapping_math = 0;
+
+  /* We don't care in Ada about errno, and it causes __builtin_sqrt to
+     to call the libm function rather than do it inline.  */
+  if (!global_options_set.x_flag_errno_math)
+    flag_errno_math = 0;
 }
 
 /* Print language-specific items in declaration NODE.  */