blob: 2a15a5d7f5bf682dada2b6c7293e976ccebc17bc [file] [log] [blame]
/* { dg-additional-options "-O2" } */
#include <stdlib.h>
struct List {
struct List *next;
};
void foo(struct List *p, struct List *q)
{
while (p && p != q){
struct List *next = p->next;
free(p);
p = next;
}
}
int main()
{
struct List x = {0};
foo(NULL, &x);
return 0;
}