http://gcc.gnu.org/bugzilla/show_bug.cgi?id=46156
Yu Simin <silver24k at gmail dot com> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |silver24k at gmail dot com
--- Comment #1 from Yu Simin <silver24k at gmail dot com> 2010-10-24 10:18:55
UTC ---
this code (reduced from wxprintf.cpp in wxWidget trunk)
#include <stdarg.h>
template <typename _T>
void
foo (long double *p, va_list &argptr)
{
*p = va_arg (argptr, long double);
}
void
bar (va_list ap)
{
long double argdata;
foo<char> (&argdata, ap);
}
can also produce this ICE
mingw32-gcc -O2 -c ice.cpp # alias of i786-mingw32-gcc running on Linux 64bit
OR win32
ice.cpp: In function 'void foo(long double*, char*&) [with _T = char, va_list =
char*]':
ice.cpp:12:25: instantiated from here
ice.cpp:6:3: internal compiler error: in tsubst_copy, at cp/pt.c:11370
arm-gcc -O2 -c ice.cpp # alias of arm-none-eabi-gcc running on Linux 64bit
OR win32
ice.cpp:9:6: note: the mangling of 'va_list' has changed in GCC 4.4
ice.cpp: In function 'void foo(long double*, va_list&) [with _T = char, va_list
= __va_list]':
ice.cpp:12:25: instantiated from here
ice.cpp:6:3: internal compiler error: in tsubst_copy, at cp/pt.c:11370
both the ARM and MINGW32 versions are built from trunk r165885