This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: c/8639: [3.2/3.3 regression] simple integer arithmetic expression broken


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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]