Bugs item #3577669, was opened at 2012-10-16 08:28
Message generated for change (Tracker Item Submitted) made by spth
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=100599&aid=3577669&group_id=599
Please note that this message will contain a full copy of the comment thread,
including the initial issue submission, for this request,
not just the latest update.
Category: None
Group: None
Status: Open
Resolution: None
Priority: 6
Private: No
Submitted By: Philipp Klaus Krause (spth)
Assigned to: Nobody/Anonymous (nobody)
Summary: Broken compile-time int division (gcc-torture-execute-20021)
Initial Comment:
It seems division of integer literals is broken, resulting in nonzero results when small numbers are divided by big ones. To reproduce, remove the #if0 in gcc-torture-execute-20021010-1.c regression test.
Philipp
----------------------------------------------------------------------
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=100599&aid=3577669&group_id=599

Thread view

Bugs item #3577669, was opened at 2012-10-16 08:28
Message generated for change (Tracker Item Submitted) made by spth
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=100599&aid=3577669&group_id=599
Please note that this message will contain a full copy of the comment thread,
including the initial issue submission, for this request,
not just the latest update.
Category: None
Group: None
Status: Open
Resolution: None
Priority: 6
Private: No
Submitted By: Philipp Klaus Krause (spth)
Assigned to: Nobody/Anonymous (nobody)
Summary: Broken compile-time int division (gcc-torture-execute-20021)
Initial Comment:
It seems division of integer literals is broken, resulting in nonzero results when small numbers are divided by big ones. To reproduce, remove the #if0 in gcc-torture-execute-20021010-1.c regression test.
Philipp
----------------------------------------------------------------------
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=100599&aid=3577669&group_id=599

Bugs item #3577669, was opened at 2012-10-16 08:28
Message generated for change (Comment added) made by epetrich
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=100599&aid=3577669&group_id=599
Please note that this message will contain a full copy of the comment thread,
including the initial issue submission, for this request,
not just the latest update.
Category: C-Front End
Group: fixed
Status: Closed
Resolution: Fixed
Priority: 6
Private: No
Submitted By: Philipp Klaus Krause (spth)
Assigned to: Erik Petrich (epetrich)
Summary: Broken compile-time int division (gcc-torture-execute-20021)
Initial Comment:
It seems division of integer literals is broken, resulting in nonzero results when small numbers are divided by big ones. To reproduce, remove the #if0 in gcc-torture-execute-20021010-1.c regression test.
Philipp
----------------------------------------------------------------------
>Comment By: Erik Petrich (epetrich)
Date: 2012-11-14 22:59
Message:
Just to clarify the problem: (a/b)/c when b and c are literals was
converted to (a/(b*c))/1. Because the multiplication was done using the C
integer promotion rules, (b*c) may be too large to fit in an int and
overflow yielding a different result than the original (a/b)/c. While
conceivably one might be able to determine whether or not overflow would
occur, there was also the problem of ensuring the expression would have the
same type as the original. Because of these complications I decided it
would be safest to simply disable this optimization.
----------------------------------------------------------------------
Comment By: Erik Petrich (epetrich)
Date: 2012-11-14 22:45
Message:
Fixed in revision #8219.
----------------------------------------------------------------------
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=100599&aid=3577669&group_id=599

Community

Help

Get latest updates about Open Source Projects, Conferences and News.

Sign up for the SourceForge newsletter:

I agree to receive quotes, newsletters and other information from sourceforge.net and its partners regarding IT services and products. I understand that I can withdraw my consent at any time. Please refer to our Privacy Policy or Contact Us for more details