This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug tree-optimization/23192] [4.0 Regression] Wrong code
- 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: 2 Aug 2005 06:22:09 -0000
- Subject: [Bug tree-optimization/23192] [4.0 Regression] Wrong code
- References: <20050802060336.23192.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-08-02 06:22 -------
I should note the better testcase is:
typedef __SIZE_TYPE__ size_t;
typedef struct {
size_t car;
size_t cdr;
} cons;
int g(void);
size_t f(size_t a)
{
size_t x;
size_t *d;
size_t i;
d = &x;
while ( (i = g()) != 0)
{
if (i >= 30)
d = &((cons*)i)->car;
}
*d = 1;
}
The previous passes on 20050705 because of constant prop.
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=23192