This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
Re: [PATCH] s390: Fix infcalls passing a single-field struct with static members
- From: Tom Tromey <tom at tromey dot com>
- To: Andreas Arnez <arnez at linux dot ibm dot com>
- Cc: gdb-patches at sourceware dot org, Ulrich Weigand <uweigand at de dot ibm dot com>
- Date: Fri, 11 Oct 2019 11:46:02 -0600
- Subject: Re: [PATCH] s390: Fix infcalls passing a single-field struct with static members
- References: <m3tv8f5oc1.fsf@oc0404454431.ibm.com>
>>>>> "Andreas" == Andreas Arnez <arnez@linux.ibm.com> writes:
Andreas> The infcall-nested-structs test case yields 36 FAILs on s390x because GCC
Andreas> and GDB disagree on how to pass a C++ struct like this as an argument to a
Andreas> function:
Andreas> struct s { float x; static float y; };
Andreas> For the purpose of argument passing, GCC ignores static fields, while GDB
Andreas> does not. Thus GCC passes the argument in a floating-point register and
Andreas> GDB passes it via memory.
Andreas> Fix this by explicitly ignoring static fields when detecting single-field
Andreas> structs.
FWIW this looked reasonable to me.
Tom