This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug tree-optimization/15791] fold misses that two ADDR_EXPR of an arrary obvious not equal
- From: "pinskia at gcc dot gnu dot org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 26 Jan 2005 14:38:07 -0000
- Subject: [Bug tree-optimization/15791] fold misses that two ADDR_EXPR of an arrary obvious not equal
- References: <20040603004359.15791.pinskia@gcc.gnu.org>
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
------- Additional Comments From pinskia at gcc dot gnu dot org 2005-01-26 14:38 -------
(In reply to comment #5)
> Could we, in general, fold &a[i] TRUTHOP &a[j] to i TRUTHOP j? I guess the
> only special case would be for sizeof(a[i]) == 0 -- but that is not allowed
> by the standard? I'll be wading through fold tomorrow and look where to add
> this transformation.
sizeof(a[i]) can be zero for other languages besides C++ (C for an example).
I gave you an hint where this can be fixed by the coment :).
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=15791