8sa1-gcc/gcc/testsuite/gcc.c-torture/execute/20000706-5.c
Jakub Jelinek f5afd9e924 sibcall.c (uses_addressof): Add INMEM argument...
* sibcall.c (uses_addressof): Add INMEM argument, check for
	current_function_internal_arg_pointer outside of MEM rtxs in addition
	to ADDRESSOFs.
	(sequence_uses_addressof): Update caller.

	* gcc.c-torture/execute/20000706-1.c: New test.
	* gcc.c-torture/execute/20000706-2.c: New test.
	* gcc.c-torture/execute/20000706-3.c: New test.
	* gcc.c-torture/execute/20000706-4.c: New test.
	* gcc.c-torture/execute/20000706-5.c: New test.

From-SVN: r34906
2000-07-07 21:55:29 +02:00

29 lines
325 B
C

extern void abort(void);
extern void exit(int);
struct baz { int a, b, c; };
struct baz *c;
void bar(int b)
{
if (c->a != 1 || c->b != 2 || c->c != 3 || b != 4)
abort();
}
void foo(struct baz a, int b)
{
c = &a;
bar(b);
}
int main()
{
struct baz a;
a.a = 1;
a.b = 2;
a.c = 3;
foo(a, 4);
exit(0);
}