Bug 906516

Summary: regression: Conversion of Long_Float to Integer triggers CONSTRAINT_ERROR overflow check failed
Product: [Fedora] Fedora Reporter: Orion Poplawski <orion>
Component: gccAssignee: Jakub Jelinek <jakub>
Status: CLOSED RAWHIDE QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: urgent Docs Contact:
Priority: unspecified    
Version: rawhideCC: jakub, law, pavel
Target Milestone: ---Keywords: Regression
Target Release: ---   
Hardware: x86_64   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2013-02-09 09:22:42 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Orion Poplawski 2013-01-31 18:49:56 UTC
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


Version-Release number of selected component (if applicable):
gcc-4.8.0-0.7.fc19.x86_64

Comment 1 Jakub Jelinek 2013-02-02 09:03:04 UTC
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 17:47:47 UTC
This appears to be fixed upstream, hopefully we can get this into rawhide soon then.

Comment 3 Jakub Jelinek 2013-02-09 09:22:42 UTC
Should be fixed in gcc-4.8.0-0.10.fc19.

Comment 4 Orion Poplawski 2013-02-11 18:17:18 UTC
plplot built fine now.  Thanks!