This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug tree-optimization/24689] store_ccp is missing an opportunity because of call clobber/alias load?
- 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: 6 Nov 2005 04:34:23 -0000
- Subject: [Bug tree-optimization/24689] store_ccp is missing an opportunity because of call clobber/alias load?
- References: <bug-24689-5009@http.gcc.gnu.org/bugzilla/>
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
------- Comment #1 from pinskia at gcc dot gnu dot org 2005-11-06 04:34 -------
Looks like another one of the call clobbered bugs:
Variable: buf, UID 1612, char[1], is an alias tag, is addressable, call
clobbered, default def: buf_2
Though that should not matter.
Here is a testcase where call clobberness is correct but it should not matter
as there is no way for the change to happen:
extern void bar (unsigned int);
extern void bar1 (const char **);
int
foo (void)
{
char buf[1] = { 3 };
const char *p = buf;
const char **q = &p;
unsigned int ch;
switch (**q)
{
case 1: ch = 5; break;
default: ch = 0; break;
}
bar (ch);
bar1 (q);
return ch;
}
--
pinskia at gcc dot gnu dot org changed:
What |Removed |Added
----------------------------------------------------------------------------
Severity|normal |enhancement
Status|UNCONFIRMED |NEW
Ever Confirmed|0 |1
Keywords| |alias
Last reconfirmed|0000-00-00 00:00:00 |2005-11-06 04:34:23
date| |
Summary|store_ccp is missing an |store_ccp is missing an
|opportunity!? |opportunity because of call
| |clobber/alias load?
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=24689