* gcc.c-torture/compile/20040214-2.c: New test.
From-SVN: r77821
This commit is contained in:
parent
5852680bfc
commit
33421d6949
2 changed files with 61 additions and 0 deletions
|
@ -1,3 +1,7 @@
|
|||
2004-02-14 Josef Zlomek <zlomekj@suse.cz>
|
||||
|
||||
* gcc.c-torture/compile/20040214-2.c: New test.
|
||||
|
||||
2004-02-14 Andrew Pinski <pinskia@physics.uc.edu>
|
||||
|
||||
PR c++/14116
|
||||
|
|
57
gcc/testsuite/gcc.c-torture/compile/20040214-2.c
Normal file
57
gcc/testsuite/gcc.c-torture/compile/20040214-2.c
Normal file
|
@ -0,0 +1,57 @@
|
|||
/* http://gcc.gnu.org/ml/gcc-patches/2004-02/msg01307.html */
|
||||
|
||||
typedef struct xdef xdef;
|
||||
struct xdef
|
||||
{
|
||||
char xtyp;
|
||||
xdef *next;
|
||||
int y;
|
||||
};
|
||||
|
||||
extern void b ();
|
||||
extern void *foo (void *bar);
|
||||
extern void *foo2 (void *bar1, void *bar2);
|
||||
extern void *qwe;
|
||||
|
||||
static void
|
||||
c (xdef * xp)
|
||||
{
|
||||
b (xp);
|
||||
}
|
||||
static void
|
||||
a (xdef ** xpp)
|
||||
{
|
||||
xdef *xp;
|
||||
xp = *xpp;
|
||||
|
||||
foo (xp);
|
||||
xp = foo2 (xp, qwe);
|
||||
b (xp->next);
|
||||
foo (xp);
|
||||
if (xp->y)
|
||||
{
|
||||
foo (xp);
|
||||
if (xp)
|
||||
{
|
||||
xdef *p = foo2 (xp, qwe);
|
||||
foo2 (xp, p);
|
||||
xp = foo (p);
|
||||
}
|
||||
else
|
||||
{
|
||||
foo2 (foo(*xpp), *xpp);
|
||||
}
|
||||
}
|
||||
*xpp = foo2 (xpp, qwe);
|
||||
}
|
||||
|
||||
void
|
||||
b (xdef ** xpp)
|
||||
{
|
||||
xdef *xp = *xpp;
|
||||
if (!xp)
|
||||
return;
|
||||
if (xp->xtyp == 0)
|
||||
a (xpp);
|
||||
c (xp);
|
||||
}
|
Loading…
Add table
Reference in a new issue