MIPS: va_arg is unable to correct extract an empty zero-length array
Nick Clifton
nickc@redhat.com
Tue Mar 15 18:00:00 GMT 2011
Hi Eric, Hi Richard,
A customer has reported the following bug with the MIPS target. Since
it is for a GNU extension to the C language (zero-length arrays) that
is being used in a non-intended fashion (the zero-length array is in a
structure with no other fields) I doubt if you will want to
investigate the problem too much, but I thought that it was worth
reporting anyway:
% mips64vr-elf-gcc -mgp32 -O2 -Tddb.ld -march=vr5500 bug.c
% mips64vr-elf-run a.out
assertion "arg4 == va4" failed: file "bug.c", line 40, function: foo
As an aside if the type3 structure in bug.c is given another,
non-zero-length field, then the test passes.
Cheers
Nick
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: bug.c
URL: <http://gcc.gnu.org/pipermail/gcc-bugs/attachments/20110315/484e5559/attachment.c>
More information about the Gcc-bugs
mailing list