aboutsummaryrefslogtreecommitdiff
path: root/gcc/testsuite/gnat.dg
diff options
context:
space:
mode:
authorEric Botcazou <ebotcazou@adacore.com>2014-10-07 07:56:43 +0000
committerEric Botcazou <ebotcazou@gcc.gnu.org>2014-10-07 07:56:43 +0000
commita35c1ac710c0bbd03f00380179a375c45c81f08a (patch)
treeddfc6423ea43b158728db7853802890da8621bf1 /gcc/testsuite/gnat.dg
parent7a0ca710c81d249cf8346eb243120dd6f727b354 (diff)
downloadgcc-a35c1ac710c0bbd03f00380179a375c45c81f08a.zip
gcc-a35c1ac710c0bbd03f00380179a375c45c81f08a.tar.gz
gcc-a35c1ac710c0bbd03f00380179a375c45c81f08a.tar.bz2
lto-opts.c (lto_write_options): Handle -fmath-errno, -fsigned-zeros and -ftrapping-math.
* lto-opts.c (lto_write_options): Handle -fmath-errno, -fsigned-zeros and -ftrapping-math. * lto-wrapper.c (merge_and_complain): Likewise. (run_gcc): Likewise. From-SVN: r215966
Diffstat (limited to 'gcc/testsuite/gnat.dg')
-rw-r--r--gcc/testsuite/gnat.dg/lto16.adb17
-rw-r--r--gcc/testsuite/gnat.dg/lto16_pkg.adb18
-rw-r--r--gcc/testsuite/gnat.dg/lto16_pkg.ads5
3 files changed, 40 insertions, 0 deletions
diff --git a/gcc/testsuite/gnat.dg/lto16.adb b/gcc/testsuite/gnat.dg/lto16.adb
new file mode 100644
index 0000000..82d02b4
--- /dev/null
+++ b/gcc/testsuite/gnat.dg/lto16.adb
@@ -0,0 +1,17 @@
+-- { dg-do link }
+-- { dg-options "-O -flto" }
+-- { dg-require-effective-target lto }
+
+with Lto16_Pkg; use Lto16_Pkg;
+with Text_IO; use Text_IO;
+
+procedure Lto16 is
+begin
+ if F = 0.0 then
+ Put_Line ("zero");
+ else
+ Put_Line ("non-zero");
+ end if;
+exception
+ when others => Put_Line ("exception");
+end;
diff --git a/gcc/testsuite/gnat.dg/lto16_pkg.adb b/gcc/testsuite/gnat.dg/lto16_pkg.adb
new file mode 100644
index 0000000..edfa399
--- /dev/null
+++ b/gcc/testsuite/gnat.dg/lto16_pkg.adb
@@ -0,0 +1,18 @@
+with Ada.Calendar; use Ada.Calendar;
+
+package body Lto16_Pkg is
+
+ function F return Float is
+ F1 : Float := Float (Seconds (Clock));
+ F2 : Float := Float (Seconds (Clock));
+ F : Float;
+ begin
+ if F1 > F2 then
+ F := (F2 - F1) / 2.0;
+ else
+ F := (F1 - F2) / 2.0;
+ end if;
+ return F;
+ end;
+
+end Lto16_Pkg;
diff --git a/gcc/testsuite/gnat.dg/lto16_pkg.ads b/gcc/testsuite/gnat.dg/lto16_pkg.ads
new file mode 100644
index 0000000..e9b74d3
--- /dev/null
+++ b/gcc/testsuite/gnat.dg/lto16_pkg.ads
@@ -0,0 +1,5 @@
+package Lto16_Pkg is
+
+ function F return Float;
+
+end Lto16_Pkg;