This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug tree-optimization/19723] [4.0 Regression] A side effect is missed in 0 % a++.
- From: "rth at gcc dot gnu dot org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 1 Feb 2005 20:20:25 -0000
- Subject: [Bug tree-optimization/19723] [4.0 Regression] A side effect is missed in 0 % a++.
- References: <20050131134136.19723.kazu@cs.umass.edu>
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
------- Additional Comments From rth at gcc dot gnu dot org 2005-02-01 20:20 -------
Subject: Re: [4.0 Regression] A side effect is missed in 0 % a++.
On Tue, Feb 01, 2005 at 07:49:16AM -0700, Jeffrey A Law wrote:
> Would would mean that we really can't do anything with DIV/MOD when
> the numerator is a constant and the denominator is an unknown.
Correct.
> What I think we really want is to know whether or not the language
> requires trapping on a DIV/MOD by zero. If so, then disable this class
> of optimizations, otherwise we have a non-conformant program.
True.
r~
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=19723