c/8639: [3.2/3.3 regression] simple integer arithmetic expression broken
bangerth@dealii.org
bangerth@dealii.org
Mon Nov 25 21:06:00 GMT 2002
Old Synopsis: simple integer arithmetic expression broken
New Synopsis: [3.2/3.3 regression] simple integer arithmetic expression broken
State-Changed-From-To: open->analyzed
State-Changed-By: bangerth
State-Changed-When: Tue Nov 19 07:36:06 2002
State-Changed-Why:
Unless I am very blind, I think this reduced testcase
should indeed pass the assertion:
-------------------------
#include <assert.h>
int foo (int i) {
int r;
r = (80 - 4 * i) / 20;
assert (r == 3);
}
int main () {
foo(1);
}
-----------------------------
Unfortunately, it aborts, with all gccs since 3.0. It
passes with 2.95, though. Since this seems like a regression
to me, I raise the priority. Note that no optimization
flags are necessary to trigger this behavior. The same
happens with the C++ front end, by the way.
http://gcc.gnu.org/cgi-bin/gnatsweb.pl?cmd=view%20audit-trail&database=gcc&pr=8639
More information about the Gcc-prs
mailing list