This is the mail archive of the
gcc-prs@gcc.gnu.org
mailing list for the GCC project.
Re: c/8083: GCC 3.2 Optimization bug
- From: Bruce Korb <bkorb at pacbell dot net>
- To: nobody at gcc dot gnu dot org
- Cc: gcc-prs at gcc dot gnu dot org,
- Date: 28 Sep 2002 22:56:01 -0000
- Subject: Re: c/8083: GCC 3.2 Optimization bug
- Reply-to: Bruce Korb <bkorb at pacbell dot net>
The following reply was made to PR c/8083; it has been noted by GNATS.
From: Bruce Korb <bkorb@pacbell.net>
To: gcc-gnats@gcc.gnu.org
Cc: bkorb@gnu.org
Subject: Re: c/8083: GCC 3.2 Optimization bug
Date: Sat, 28 Sep 2002 15:53:24 -0700
gcc-gnats@gcc.gnu.org wrote:
>
> Thank you very much for your problem report.
More data: It is specifically this routine:
YYSTYPE
addSibMacro(
YYSTYPE def,
YYSTYPE list )
{
tDefEntry* pDef = (tDefEntry*)def;
tDefEntry* pScn = (tDefEntry*)list;
tDefEntry** ppT = (tDefEntry**)&list;
for (;;) {
if (strcmp( pDef->pzDefName, pScn->pzDefName ) == 0) {
/*
* Make sure that two entries with the same name
* are of the same type.
*/
if (pDef->valType != pScn->valType) {
char* pz = asprintf( "macro named ``%s'' has two types",
pDef->pzDefName );
AG_ABEND( pz );
}
/*
* Link in the new head of the twin chain to the sibling list.
* If the twin list is the first sibling, then ppT points
* to the "list" variable. It will now be changed to return
* the value we need to return (the new head).
*/
pDef->pNext = pScn->pNext;
pScn->pNext = NULL;
*ppT = pDef;
/*
* Find the end of the twin list for the new eldest twin.
* Do this by setting a pointer to the place where we have
* to stash the pointer to the list. (We are not saving it.)
*/
for (ppT = &(pDef->pTwin);
*ppT != NULL;
ppT = &((*ppT)->pTwin) )
;
*ppT = pScn;
break;
}
/*
* IF we are at the end of the list,
* THEN put the new entry at the start of the list
*/
if (pScn->pNext == NULL) {
pDef->pNext = (tDefEntry*)list;
list = def;
break;
}
/*
* Check the next sibling for a twin value.
* If it is a twin, we will have to remember where
* we got the pointer so we can set a new value.
*/
ppT = &(pScn->pNext);
pScn = pScn->pNext;
}
return list;
}