[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: changing "configure" to default to "gcc -g -O2 -fwrapv ..."
From: |
Richard Kenner |
Subject: |
Re: changing "configure" to default to "gcc -g -O2 -fwrapv ..." |
Date: |
Sun, 31 Dec 2006 21:59:11 EST |
> But didn't this thread get started by a real program that was broken
> by an optimization of loop invariants? Certainly I got a real bug
> report of a real problem, which you can see here:
>
> http://lists.gnu.org/archive/html/bug-gnulib/2006-12/msg00084.html
I just thought of something interesting about this case. We have a loop
looking like:
for (j = 1; 0 < j; j *= 2)
in this case, the compiler is quite capable of arguing "this end condition
won't terminate the loop except in the case of overflow, so obviously the
programmer must be relying on wrapping semantics. So let's use those here"
> Here is a bit more discussion:
>
> http://gcc.gnu.org/ml/gcc/2006-12/msg00607.html
Indeed that message hinted at exactly that point. Note that if you do
argue along those lines, you can convert this to a loop with a new IV
that increments up to 31 (or is it 32?).
- Re: changing "configure" to default to "gcc -g -O2 -fwrapv ...", (continued)
- RE: changing "configure" to default to "gcc -g -O2 -fwrapv ...", Dave Korn, 2006/12/31
- Re: changing "configure" to default to "gcc -g -O2 -fwrapv ...", Karl Berry, 2006/12/31
- Re: changing "configure" to default to "gcc -g -O2 -fwrapv ...", Bruce Korb, 2006/12/31
- Re: changing "configure" to default to "gcc -g -O2 -fwrapv ...", Robert Dewar, 2006/12/31
- Re: changing "configure" to default to "gcc -g -O2 -fwrapv ...", Paul Eggert, 2006/12/31
- Re: changing "configure" to default to "gcc -g -O2 -fwrapv ...", Richard Kenner, 2006/12/31
- Re: changing "configure" to default to "gcc -g -O2 -fwrapv ...", Ian Lance Taylor, 2006/12/31
- Re: changing "configure" to default to "gcc -g -O2 -fwrapv ...",
Richard Kenner <=
- Re: changing "configure" to default to "gcc -g -O2 -fwrapv ...", Daniel Berlin, 2006/12/31
- Re: changing "configure" to default to "gcc -g -O2 -fwrapv ...", Bruce Korb, 2006/12/31
- Re: changing "configure" to default to "gcc -g -O2 -fwrapv ...", Bernd Schmidt, 2006/12/31
- Re: changing "configure" to default to "gcc -g -O2 -fwrapv ...", Gabriel Dos Reis, 2006/12/31
- Re: changing "configure" to default to "gcc -g -O2 -fwrapv ...", Joe Buck, 2006/12/30
- Re: changing "configure" to default to "gcc -g -O2 -fwrapv ...", Richard Kenner, 2006/12/30
- Re: changing "configure" to default to "gcc -g -O2 -fwrapv ...", Joe Buck, 2006/12/31
- Re: changing "configure" to default to "gcc -g -O2 -fwrapv ...", Paul Eggert, 2006/12/31
- Re: changing "configure" to default to "gcc -g -O2 -fwrapv ...", Richard Kenner, 2006/12/31
- Re: changing "configure" to default to "gcc -g -O2 -fwrapv ...", Vincent Lefevre, 2006/12/31