[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: GCC optimizes integer overflow: bug or feature?
From: |
Paul Eggert |
Subject: |
Re: GCC optimizes integer overflow: bug or feature? |
Date: |
Thu, 21 Dec 2006 15:44:44 -0800 |
User-agent: |
Gnus/5.1008 (Gnus v5.10.8) Emacs/21.4 (gnu/linux) |
Ian Lance Taylor <address@hidden> writes:
> We could disable VRP's assumptions about signed overflow. I don't
> know what else we could do to fix this case. I don't even know how we
> could issue a useful warning. Perhaps there is a way.
It is a knotty problem. Thanks for thinking about it.
I'm Handwaving with a capital H here, but one possibility is
for plain -O2 to keep VRP, but disable its assumption about
signed overflow when attempting to optimize away a
comparison that comes directly from the user's code (as
opposed to a comparison coming from subscript checking and
the like).
Here's another wild idea. Perhaps GCC could add an option
"-fundefinedv" to request for aggressive optimizations
assuming that the program will never have an signed integer
overflow. I.e., if you want the optimization that is
causing trouble here, you would specify "-O2 -fundefinedv";
but the default would be to disable this particular
troublesome optimization.
- Re: GCC optimizes integer overflow: bug or feature?, (continued)
- Re: GCC optimizes integer overflow: bug or feature?, Denis Vlasenko, 2006/12/23
- Re: GCC optimizes integer overflow: bug or feature?, Rask Ingemann Lambertsen, 2006/12/23
- Re: GCC optimizes integer overflow: bug or feature?, Gabriel Dos Reis, 2006/12/20
- Re: GCC optimizes integer overflow: bug or feature?, Robert Dewar, 2006/12/20
- Message not available
- Re: GCC optimizes integer overflow: bug or feature?, Paolo Bonzini, 2006/12/21
- Re: GCC optimizes integer overflow: bug or feature?, Paul Eggert, 2006/12/21
- Re: GCC optimizes integer overflow: bug or feature?, Joseph S. Myers, 2006/12/21
- Re: GCC optimizes integer overflow: bug or feature?, Paul Eggert, 2006/12/21
- Re: GCC optimizes integer overflow: bug or feature?, Ian Lance Taylor, 2006/12/21
- Re: GCC optimizes integer overflow: bug or feature?, Joseph S. Myers, 2006/12/21
- Re: GCC optimizes integer overflow: bug or feature?,
Paul Eggert <=
- Re: GCC optimizes integer overflow: bug or feature?, Gabriel Dos Reis, 2006/12/21
- Re: GCC optimizes integer overflow: bug or feature?, Paolo Bonzini, 2006/12/22
- Re: GCC optimizes integer overflow: bug or feature?, Paolo Bonzini, 2006/12/22
- Re: GCC optimizes integer overflow: bug or feature?, Paul Eggert, 2006/12/29
- Message not available
- Re: GCC optimizes integer overflow: bug or feature?, Toon Moene, 2006/12/27
- Re: GCC optimizes integer overflow: bug or feature?, Joe Buck, 2006/12/20
- Re: GCC optimizes integer overflow: bug or feature?, Andrew Haley, 2006/12/20
- Re: GCC optimizes integer overflow: bug or feature?, Gabriel Dos Reis, 2006/12/20
- RE: GCC optimizes integer overflow: bug or feature?, Dave Korn, 2006/12/20
- Re: GCC optimizes integer overflow: bug or feature?, Dorit Nuzman, 2006/12/20