------- Comment #10 from mh+gcc at glandium dot org  2010-09-16 07:43 -------
(In reply to comment #9)
> Created an attachment (id=21806)
 --> (http://gcc.gnu.org/bugzilla/attachment.cgi?id=21806&action=view) [edit]
> testcase
> 
> Here you go. This passes at -O0 but fails at -O2. Note that the testcase
> requires >= 7 args to the test function, to force the last arg to spill onto
> the stack; also an inner (non-inlined) function call, to force that single
> stack arg to be zero-extended to word size and overwrite the flags.

Another way to achieve the test without relying on the compiler optimization
would be to use int or size_t arguments, but pass bools through ffi_call. This
may not work on all architectures, though.

Also, interestingly, the original patch doesn't trigger any testsuite failure.
Maybe the various cls tests should be extended to get a first dummy argument.


-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=45677

Reply via email to