On Thu, Apr 14, 2016 at 10:41 AM, Kyrill Tkachov <kyrylo.tkac...@foss.arm.com> wrote: > > On 14/04/16 09:02, Christophe Lyon wrote: >> >> On 13 April 2016 at 22:12, Jason Merrill <ja...@redhat.com> wrote: >>> >>> On 04/13/2016 03:18 PM, Jakub Jelinek wrote: >>>> >>>> On Wed, Apr 13, 2016 at 03:11:34PM -0400, Jason Merrill wrote: >>>>> >>>>> commit 761983a023b5217ef831a43f423779940c788ecf >>>>> Author: Jason Merrill <ja...@redhat.com> >>>>> Date: Tue Apr 12 13:16:50 2016 -0400 >>>>> >>>>> gcc/ >>>>> * cfgexpand.c (pass_expand::execute): Handle attribute >>>>> abi_warning. >>>>> * expr.c (expand_expr_real_1): Likewise. >>>>> gcc/cp/ >>>>> * call.c (empty_class_msg, mark_for_abi_warning): New. >>>>> (build_call_a): Use them. >>>>> * decl.c (store_parm_decls): Use mark_for_abi_warning. >>>>> * error.c (pp_format_to_string): New. >>>> >>>> >>>> I think you should put a space into the attribute name instead of _ >>>> to make it clear that it is not an attribute users can use directly in >>>> their >>>> code through __attribute__. >>>> >>>> Otherwise it looks reasonable to me. >>> >>> >>> Thanks, applied with that change. >>> >> Hi, >> >> I'm seeing g++.dg/abi/empty13.C failing at execution on >> aarch64-none-linux-gnu (using qemu): >> qemu: uncaught target signal 11 (Segmentation fault) - core dumped >> >> and aarch64_be-none-elf (using the Foundation Model): >> Terminated by exception. >> >> But it passes on aarch64-none-elf (using the Foundation Model too) >> >> Am I the only one? > > Hi Christophe, > > I see the test failing on aarch64-none-linux-gnu (native) > with no output, just: > spawn [open ...] > FAIL: g++.dg/abi/empty13.C -std=gnu++98 execution test > > And I see it passing on aarch64-none-elf.
IIRC on AArch64 we document that empty classes and structs take up a slot as per the PCS . http://infocenter.arm.com/help/topic/com.arm.doc.ihi0059b/IHI0059B_cppabi64.pdf See section 3.1 For the purposes of parameter passing in [ AAPCS64 ], a parameter whose type is an empty class shall be treated as if its type were an aggregate with a single member of type unsigned byte. regards Ramana > > I haven't tried aarch64_be-none-elf yet. > > Kyrill > > >> Christophe. >> >> >> >>> Jason >>> >