https://gcc.gnu.org/bugzilla/show_bug.cgi?id=79908
Bill Schmidt <wschmidt at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|UNCONFIRMED |NEW
Last reconfirmed| |2017-03-13
Component|target |tree-optimization
Ever confirmed|0 |1
--- Comment #1 from Bill Schmidt <wschmidt at gcc dot gnu.org> ---
Minimal test:
#include <stdarg.h>
void testva (int n, ...)
{
va_list ap;
_Complex int i = va_arg (ap, _Complex int);
}
The use of a _Complex type is required to exhibit the bug (plain old int and
double work fine).
The optimizer recognizes that the assignment to i is dead, but the side effects
of va_arg present it from similarly going dead, so we end up with:
testva (int n)
{
char * ap;
<bb 2> [100.00%]:
VA_ARG (&ap, 0B, 0B);
ap ={v} {CLOBBER};
return;
}
which the gimplifier doesn't know what to do with for complex cases.
Not a target bug; changing to tree-optimization component.
Confirmed, btw.