http://gcc.gnu.org/bugzilla/show_bug.cgi?id=56178
Bug #: 56178
Summary: [4.8 Regression] Conversion of Long_Float to Integer
triggers CONSTRAINT_ERROR overflow check failed
Classification: Unclassified
Product: gcc
Version: 4.8.0
Status: UNCONFIRMED
Severity: major
Priority: P3
Component: ada
AssignedTo: [email protected]
ReportedBy: [email protected]
Description of problem:
$ cat test_overflow.adb
procedure Test_Overflow is
r : Integer;
r1 : Long_Float := 0.3;
begin
r := Integer(r1);
end Test_Overflow;
$ gnatmake test_overflow.adb
gcc -c test_overflow.adb
gnatbind -x test_overflow.ali
gnatlink test_overflow.ali
$ ./test_overflow
raised CONSTRAINT_ERROR : test_overflow.adb:5 overflow check failed
gcc-4.8.0-0.7.fc19.x86_64