aboutsummaryrefslogtreecommitdiff
path: root/gcc/tree-inline.c
diff options
context:
space:
mode:
authorEd Schonberg <schonberg@adacore.com>2018-05-29 09:42:05 +0000
committerPierre-Marie de Rodat <pmderodat@gcc.gnu.org>2018-05-29 09:42:05 +0000
commitef22a3b26940b059888ea409a53f5a91af44887d (patch)
tree05d1f19e7f5eb43fc4f1ec7e06934cd79cc17617 /gcc/tree-inline.c
parent54e33e5f6a0f566e6b0e96da3d5f27449d807248 (diff)
downloadgcc-ef22a3b26940b059888ea409a53f5a91af44887d.zip
gcc-ef22a3b26940b059888ea409a53f5a91af44887d.tar.gz
gcc-ef22a3b26940b059888ea409a53f5a91af44887d.tar.bz2
[Ada] Improper behavior of floating-point attributes
This patch fixes an error in the handling of attributes Pred qnd Succ when applied to the limit values of a floating-point type. The RM mandates that such operations must raise constraint_error, but GNAT generated in most cases an infinite value, regardless of whether overflow checks were enabled. 2018-05-29 Ed Schonberg <schonberg@adacore.com> gcc/ada/ * libgnat/s-fatgen.adb (Succ, Pred): Raise Constraint_Error unconditionally when applied to the largest positive (resp. largest negative) value of a floating-point type. gcc/testsuite/ * gnat.dg/float_attributes_overflows.adb: New testcase. From-SVN: r260882
Diffstat (limited to 'gcc/tree-inline.c')
0 files changed, 0 insertions, 0 deletions