This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Patch for 3.3?
- From: Dale Johannesen <dalej at apple dot com>
- To: gcc-patches at gcc dot gnu dot org
- Cc: Dale Johannesen <dalej at apple dot com>
- Date: Fri, 28 Mar 2003 17:44:52 -0800
- Subject: Patch for 3.3?
I'd like to nominate this bit (just this function):
2003-02-26 Zdenek Dvorak <rakdver at atrey dot karlin dot mff dot cuni dot cz>
* cse.c (count_reg_usage): Fix handling of REG_EQUAL notes.
for 3.3. It wasn't clear to me from the original patch request,
but this is actually a bug fix. Here's a test case that breaks
without it on the 3.3 branch (ppc darwin, -O2 -funroll-loops)
[this was derived from gcc.c, and showed up in the bootstrap
when an intrepid soul tried it with -funroll-loops]:
struct switchstr
{
const char *part1;
const char **args;
int live_cond;
unsigned char validated;
unsigned char ordering;
};
static struct switchstr *switches;
static int n_switches;
int x=0;
int foo() {
int i;
for (i = 0; i < n_switches; i++)
if (!strcmp (switches[i].part1, "pipe"))
break;
if (i < n_switches )
x=5;
}
main() {
int i;
switches = (struct switchstr *)malloc(sizeof(struct switchstr)*100);
for ( i=0; i<100; i++ )
switches[i].part1 = "x";
switches[93].part1 = "pipe";
n_switches = 100;
foo();
if ( x!=5 )
abort();
}