Re: Bug 20375 - ia64 varadic regression

2005-03-09 Thread Nathan Sidwell
Mark Mitchell wrote: Zack Weinberg wrote: So, in other words, if (current_function_stdarg) data->last_named = true; Actually, no: data->last_named = !TREE_CHAIN (parm); (This is the last "named" parameter iff it's the last parameter.) yes, this is essentially the patch I am testing. AFAIC

Re: Bug 20375 - ia64 varadic regression

2005-03-08 Thread Mark Mitchell
Zack Weinberg wrote: So, in other words, if (current_function_stdarg) data->last_named = true; Actually, no: data->last_named = !TREE_CHAIN (parm); (This is the last "named" parameter iff it's the last parameter.) But, right idea. :-) -- Mark Mitchell CodeSourcery, LLC [EMAIL PROTECTED] (91

Re: Bug 20375 - ia64 varadic regression

2005-03-08 Thread Zack Weinberg
Mark Mitchell <[EMAIL PROTECTED]> writes: > Zack Weinberg wrote: > >> It would certainly be nice to get rid of this mess, but Jim Wilson >> expressed concerns last time it came up: >> > > Well, sidestepping that, what the compiler really se

Re: Bug 20375 - ia64 varadic regression

2005-03-08 Thread Mark Mitchell
Zack Weinberg wrote: It would certainly be nice to get rid of this mess, but Jim Wilson expressed concerns last time it came up: Well, sidestepping that, what the compiler really seems to want is "the last argument that was declared by the

RE: Bug 20375 - ia64 varadic regression

2005-03-08 Thread Dave Korn
Original Message >From: Zack Weinberg >Sent: 08 March 2005 18:25 > Nathan Sidwell <[EMAIL PROTECTED]> writes: > >> Dave Korn wrote: >> >>> There was under varargs, which didn't require to pass a named >>> argument to va_start; it's only with stdargs that it would be >>> impossible. I su

RE: Bug 20375 - ia64 varadic regression

2005-03-08 Thread Dave Korn
Original Message >From: Richard Henderson >Sent: 08 March 2005 18:24 > On Tue, Mar 08, 2005 at 10:15:09AM -0700, Jeffrey A Law wrote: >> FWIW, there is actually a system which varies its ABI based on whether >> or not an argument is named -- my old favorite, the 32bit PA SOM ABI >> behaves

Re: Bug 20375 - ia64 varadic regression

2005-03-08 Thread Zack Weinberg
Nathan Sidwell <[EMAIL PROTECTED]> writes: > Dave Korn wrote: > >> There was under varargs, which didn't require to pass a named >> argument to va_start; it's only with stdargs that it would be >> impossible. I suspect that this is the underlying reason for the >> code having developed this way:

Re: Bug 20375 - ia64 varadic regression

2005-03-08 Thread Richard Henderson
On Tue, Mar 08, 2005 at 10:15:09AM -0700, Jeffrey A Law wrote: > FWIW, there is actually a system which varies its ABI based on whether > or not an argument is named -- my old favorite, the 32bit PA SOM ABI > behaves in this manner. In fact, I believe it is the only port which > gives a hoot about

Re: Bug 20375 - ia64 varadic regression

2005-03-08 Thread Nathan Sidwell
Dave Korn wrote: There was under varargs, which didn't require to pass a named argument to va_start; it's only with stdargs that it would be impossible. I suspect that this is the underlying reason for the code having developed this way: sometimes the first variadic arg is the last named arg (

RE: Bug 20375 - ia64 varadic regression

2005-03-08 Thread Dave Korn
Original Message >From: Andrew Pinski >Sent: 08 March 2005 16:13 > On Mar 8, 2005, at 10:59 AM, Nathan Sidwell wrote: > >> Bug 20375 is logged as a C++ bug, but it is a middle end >> bug that cannot be expressed in C. Here's a reduced testcase >> >> union U >> { >> void *m[7]; >> }; >

Re: Bug 20375 - ia64 varadic regression

2005-03-08 Thread Jeffrey A Law
On Tue, 2005-03-08 at 09:06 -0800, Mark Mitchell wrote: > Nathan Sidwell wrote: > > > Notice that the last specified argument 'union U' has no name. when > > compiled for ia64-hp-hpux11.23 with -mlp64 this ICEs because of this > > bit of code in assign_parm_find_data_types > > > > /* Set LAST_

Re: Bug 20375 - ia64 varadic regression

2005-03-08 Thread Mark Mitchell
Nathan Sidwell wrote: Notice that the last specified argument 'union U' has no name. when compiled for ia64-hp-hpux11.23 with -mlp64 this ICEs because of this bit of code in assign_parm_find_data_types /* Set LAST_NAMED if this is last named arg before last anonymous args. */ if (current_fun

Re: Bug 20375 - ia64 varadic regression

2005-03-08 Thread Andreas Schwab
Andrew Pinski <[EMAIL PROTECTED]> writes: > On Mar 8, 2005, at 10:59 AM, Nathan Sidwell wrote: > >> Bug 20375 is logged as a C++ bug, but it is a middle end >> bug that cannot be expressed in C. Here's a reduced testcase >> >> union U >> { >> void *m[7]; >> }; >> >> struct C; >> >> void f(struc

Re: Bug 20375 - ia64 varadic regression

2005-03-08 Thread Andrew Pinski
On Mar 8, 2005, at 10:59 AM, Nathan Sidwell wrote: Bug 20375 is logged as a C++ bug, but it is a middle end bug that cannot be expressed in C. Here's a reduced testcase union U { void *m[7]; }; struct C; void f(struct C *c, float f, union U, ...) { } I almost want to say this is undefined as the

Bug 20375 - ia64 varadic regression

2005-03-08 Thread Nathan Sidwell
Bug 20375 is logged as a C++ bug, but it is a middle end bug that cannot be expressed in C. Here's a reduced testcase union U { void *m[7]; }; struct C; void f(struct C *c, float f, union U, ...) { } Notice that the last specified argument 'union U' has no name. when compiled for ia64-hp-hpux11