PATCH for 17526

Jason Merrill jason@redhat.com
Sun Oct 31 11:02:00 GMT 2004


The problem turned out to be that we were leaving the assignment as *p =
foo() even when foo does not return in memory, and tree-tailcall seems to
assume that an assignment does not preclude a tailcall all by itself.  If
we're making that assumption, we need to use a temporary unless foo returns
in memory.  Actually checking whether a type is returned in memory caused
problems before, so I just check for BLKmode; using a temporary in a few
cases where it isn't necessary shouldn't be a big deal if the type is
small, which it must be if it doesn't have BLKmode.

Tested x86_64-pc-linux-gnu, applied to trunk.  Testcase soon.

2004-10-31  Jason Merrill  <jason@redhat.com>

	PR middle-end/17526
	* tree-gimple.c (is_gimple_mem_rhs): Also require a val for
	aggregate types that are not BLKmode.

-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: text/x-patch
Size: 938 bytes
Desc: not available
URL: <http://gcc.gnu.org/pipermail/gcc-patches/attachments/20041031/a15c3a2b/attachment.bin>


More information about the Gcc-patches mailing list