http://gcc.gnu.org/bugzilla/show_bug.cgi?id=60336
Bug ID: 60336
Summary: va_start corrupts 6-th argument in case of empty type
used before the format string
Product: gcc
Version: 4.8.1
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: other
Assignee: unassigned at gcc dot gnu.org
Reporter: ahanins at gmail dot com
Created attachment 32208
--> http://gcc.gnu.org/bugzilla/attachment.cgi?id=32208&action=edit
va_list corruption simple example
The code in attachment (for convenience see here
http://coliru.stacked-crooked.com/a/14319753d1667629) prints garbage instead of
6-th argument if Dummy struct is empty. Adding some member to this struct
"fixes" the problem. Not sure, whether problem is in Gcc code generation or
libc, but probably related to ABI.
Tested on Ubuntu 13.04 64bit.