Bug 906516 - regression: Conversion of Long_Float to Integer triggers CONSTRAINT_ERROR overflow check failed
regression: Conversion of Long_Float to Integer triggers CONSTRAINT_ERROR ove...
Product: Fedora
Classification: Fedora
Component: gcc (Show other bugs)
x86_64 Linux
unspecified Severity urgent
: ---
: ---
Assigned To: Jakub Jelinek
Fedora Extras Quality Assurance
: Regression
Depends On:
  Show dependency treegraph
Reported: 2013-01-31 13:49 EST by Orion Poplawski
Modified: 2013-02-11 13:17 EST (History)
3 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Last Closed: 2013-02-09 04:22:42 EST
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Attachments (Terms of Use)

External Trackers
Tracker ID Priority Status Summary Last Updated
GNU Compiler Collection 56178 None None None Never

  None (edit)
Description Orion Poplawski 2013-01-31 13:49:56 EST
Description of problem:

$ cat test_overflow.adb
procedure Test_Overflow is
    r : Integer;
    r1 : Long_Float := 0.3;
    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

Version-Release number of selected component (if applicable):
Comment 1 Jakub Jelinek 2013-02-02 04:03:04 EST
Seems this is related to profiledbootstrap, when using bootstrap instead of profiledbootstrap, all of stage1-gcc/gnat1, prev-gcc/gnat1 and gcc/gnat1 work correctly, with profiledbootstrap {stage1,prev}-gcc/gnat1 work correctly and gcc/gnat1 doesn't.  The problem is somewhere in the Ada FE already, will try to bisect it and also will do a profiledbootstrap of vanilla trunk to see if it is reproduceable there.
Comment 2 Orion Poplawski 2013-02-08 12:47:47 EST
This appears to be fixed upstream, hopefully we can get this into rawhide soon then.
Comment 3 Jakub Jelinek 2013-02-09 04:22:42 EST
Should be fixed in gcc-4.8.0-0.10.fc19.
Comment 4 Orion Poplawski 2013-02-11 13:17:18 EST
plplot built fine now.  Thanks!

Note You need to log in before you can comment on or make changes to this bug.