Bug 906516 - regression: Conversion of Long_Float to Integer triggers CONSTRAINT_ERROR overflow check failed
Summary: regression: Conversion of Long_Float to Integer triggers CONSTRAINT_ERROR ove...
Keywords:
Status: CLOSED RAWHIDE
Alias: None
Product: Fedora
Classification: Fedora
Component: gcc
Version: rawhide
Hardware: x86_64
OS: Linux
unspecified
urgent
Target Milestone: ---
Assignee: Jakub Jelinek
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2013-01-31 18:49 UTC by Orion Poplawski
Modified: 2013-02-11 18:17 UTC (History)
3 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2013-02-09 09:22:42 UTC
Type: Bug
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
GNU Compiler Collection 56178 0 None None None Never

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!


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