This is the mail archive of the gcc@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

error passing variable sized arguments (PR c/3711)


Hi,
	The test case gcc.c-torture/execute/20020307-2.c
	fails for gcc build for target=sh-elf. 
	
	With default options sh-elf uses the standard va_arg handling.
	As per the following mail the problem should have got fixed
	for the targets that uses the std va_arg implementation.
	http://gcc.gnu.org/ml/gcc-patches/2002-03/msg00519.html
	

	However after the preiliminary analysis I have learnt that
	problem occurs because after copying strucuture Yand X
	on the stack the address of Yand X are also pushed on the 
	stack before the call foo(z,x,y);
	However the std va_arg implementation expects the structure
	data instead.

	I'm using gcc 3.1.1. The problem is reproducible for sh-elf build of
cvs 
	head. The test cases passes for linux i686 native 	build. It
seems 
	that native build passes the copy of the structure on the 
	stack directly. No pointers are passed.

	I think for sh-elf too the passing of variable argument needs
	to be modified so that instead of address whole structures
	are be passed.  Please let me know your opinion about this.

Thanks and Regards,
Nitin.


	


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]