From mboxrd@z Thu Jan 1 00:00:00 1970 From: Joern Rennecke To: rth@cygnus.com Cc: egcs@cygnus.com Subject: Re: alpha regression on 920625-1 Date: Mon, 27 Apr 1998 11:10:00 -0000 Message-id: <199804271603.RAA06176@phal.cygnus.co.uk> References: <19980426215614.41398@dot.cygnus.com> X-SW-Source: 1998-04/msg01077.html > typedef struct{double x,y;}point; > point pts[]={{1.0,2.0},{3.0,4.0},{5.0,6.0},{7.0,8.0}}; > static int va1(int nargs,...) > { > va_list args; > int i; > point pi; > va_start(args,nargs); > for(i=0;i pi=va_arg(args,point); > if(pts[i].x!=pi.x||pts[i].y!=pi.y)abort(); > } > va_end(args); > } > > `pi' is initially allocated to a TImode register, and when comes reload > time, we find that we must drop the register to memory. It so happens > that the copy from varargs is done in DImode, while the comparison must > of course be done in DFmode. > > The problem arose with jfc's recent mode-dependant aliasing changes. > Because the memory block created for the TImode register is not marked > as a structure, and we have two different modes manipulating the memory, > the DFmode load gets scheduled before the DImode store. Everything that gets read via varargs should be treated as part of a structure; this is already necessary to treat the writing to the varargs area properly. You can archive this with a suitable definitions of va_arg.