Commit 0eaf8b06 by Richard Guenther Committed by Richard Biener

20071018-1.c: New testcase.

2007-10-19  Richard Guenther  <rguenther@suse.de>

        * gcc.c-torture/execute/20071018-1.c: New testcase.

From-SVN: r129485
parent 1a8076fc
2007-10-19 Richard Guenther <rguenther@suse.de> 2007-10-19 Richard Guenther <rguenther@suse.de>
* gcc.c-torture/execute/20071018-1.c: New testcase.
2007-10-19 Richard Guenther <rguenther@suse.de>
PR middle-end/32921 PR middle-end/32921
* gfortran.dg/pr32921.f: New testcase. * gfortran.dg/pr32921.f: New testcase.
extern void abort(void);
struct foo {
int rank;
char *name;
};
struct mem {
struct foo *x[4];
};
void __attribute__((noinline)) bar(struct foo **f)
{
*f = __builtin_malloc(sizeof(struct foo));
}
struct foo * foo(int rank)
{
void *x = __builtin_malloc(sizeof(struct mem));
struct mem *as = x;
struct foo **upper = &as->x[rank * 8 - 1];
*upper = 0;
bar(upper);
return *upper;
}
int main()
{
if (foo(0) == 0)
abort ();
return 0;
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment