This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
question about TARGET_MUST_PASS_IN_STACK
- From: DJ Delorie <dj at redhat dot com>
- To: gcc at gcc dot gnu dot org
- Date: Tue, 2 Jun 2009 23:35:35 -0400
- Subject: question about TARGET_MUST_PASS_IN_STACK
On xstormy16, when structures with variable-length arrays are passed
to functions (execute/20020412-1.c), it appears that they're passed by
reference (based on examining the stack), despite the port not
explicitly requesting that.
This causes a mis-match in the va_arg code, which assumes the array is
passed by value, just pushed to the stack portion of the argument
list.
Which interpretation of these macros is correct? (based on that, I'll
debug further)
Xstormy16 uses the default TARGET_MUST_PASS_IN_STACK, which returns
true only for variable-length arrays, and uses the default
TARGET_PASS_BY_REFERENCE, which always returns false.