Hello

On 03/12/15 14:53, Eric Botcazou wrote:
further testing revealed an issue with va_arg handling and reverse scalar 
storage
order on some platforms: when va_list is scalar, passing a field of a structure
with reverse SSO as first argument to va_start/va_arg/va_end doesn't work 
because
the machinery takes its address and this is not allowed for such a field (it's
really a corner case but gcc.c-torture/execute/stdarg-2.c does exercise it). 
Hence
the attached patch which issues an error in this case.

The new gcc.dg/sso-9.c test is failing for aarch64 and arm targets. There's no 
error
generated if I compile the test from the command line for aarch64-none-elf. GCC 
for
x86_64 does generate the error.

Matthew

2015-12-03  Eric Botcazou  <ebotca...@adacore.com>

* c-tree.h (c_build_va_arg): Adjust prototype. * c-parser.c
(c_parser_postfix_expression): Adjust call to above. * c-typeck.c
(c_build_va_arg): Rename LOC parameter to LOC2, add LOC1 parameter, adjust
throughout and issue an error if EXPR is a component with reverse storage order.


2015-12-03  Eric Botcazou  <ebotca...@adacore.com>

* gcc.dg/sso-9.c: New test.


Reply via email to