aboutsummaryrefslogtreecommitdiff
path: root/gcc
diff options
context:
space:
mode:
authorEric Botcazou <ebotcazou@adacore.com>2013-05-28 13:52:50 +0000
committerEric Botcazou <ebotcazou@gcc.gnu.org>2013-05-28 13:52:50 +0000
commit0ba045df8f42f2af5e15a0f28f1beeaa18acaa44 (patch)
tree7d46615086d4d141883c11329608649fdbc7f160 /gcc
parentfbd7e8773135e1912e36d22e0a9c9a4e6e78c43f (diff)
downloadgcc-0ba045df8f42f2af5e15a0f28f1beeaa18acaa44.zip
gcc-0ba045df8f42f2af5e15a0f28f1beeaa18acaa44.tar.gz
gcc-0ba045df8f42f2af5e15a0f28f1beeaa18acaa44.tar.bz2
sol2-unwind.h (MD_FALLBACK_FRAME_STATE_FOR): Do not set fs->signal_frame for SIGFPE raised for IEEE-754 exceptions.
* config/sparc/sol2-unwind.h (MD_FALLBACK_FRAME_STATE_FOR): Do not set fs->signal_frame for SIGFPE raised for IEEE-754 exceptions. * config/i386/sol2-unwind.h (x86_fallback_frame_state): Likewise. From-SVN: r199381
Diffstat (limited to 'gcc')
-rw-r--r--gcc/testsuite/ChangeLog4
-rw-r--r--gcc/testsuite/gnat.dg/fp_exception.adb24
2 files changed, 28 insertions, 0 deletions
diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog
index 28c6a6da..be8eb9e 100644
--- a/gcc/testsuite/ChangeLog
+++ b/gcc/testsuite/ChangeLog
@@ -1,3 +1,7 @@
+2013-05-28 Eric Botcazou <ebotcazou@adacore.com>
+
+ * gnat.dg/fp_exception.adb: New test.
+
2013-05-28 Richard Biener <rguenther@suse.de>
PR tree-optimization/56787
diff --git a/gcc/testsuite/gnat.dg/fp_exception.adb b/gcc/testsuite/gnat.dg/fp_exception.adb
new file mode 100644
index 0000000..a8bf62f
--- /dev/null
+++ b/gcc/testsuite/gnat.dg/fp_exception.adb
@@ -0,0 +1,24 @@
+-- { dg-do run { target *-*-solaris2.* } }
+-- { dg-options "-ftrapping-math" }
+
+procedure FP_Exception is
+
+ type my_fixed is digits 15;
+ for my_fixed'size use 64;
+ fixed1 : my_fixed := 1.0;
+ fixed2 : my_fixed := -0.0;
+ mask_all : constant integer := 16#1F#;
+
+ procedure fpsetmask(mask : in integer);
+ pragma IMPORT (C, fpsetmask, "fpsetmask");
+
+begin
+
+ -- Mask all floating point exceptions so they can be trapped
+ fpsetmask (mask_all);
+
+ fixed1 := fixed1 / fixed2;
+
+exception
+ when others => null;
+end;