[Bug middle-end/36255] -fstrict-aliasing breaks __builtin_va_args
rguenth at gcc dot gnu dot org
gcc-bugzilla@gcc.gnu.org
Sat May 17 18:16:00 GMT 2008
------- Comment #10 from rguenth at gcc dot gnu dot org 2008-05-17 18:15 -------
Reduced testcase, works with -fno-strict-aliasing.
unsigned long __attribute__((noinline)) foo (int narg, ...)
{
unsigned long V1;
__builtin_va_list args;
__builtin_va_start (args, narg);
V1 = (unsigned long)__builtin_va_arg(args, void *);
/*__builtin_va_end (args);*/
return V1;
}
extern void abort (void);
int main(int argc, char**argv)
{
unsigned long x = foo (1, 0x2688612UL);
if (x != 0x2688612UL)
abort ();
return 0;
}
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=36255
More information about the Gcc-bugs
mailing list