--- Comment #6 from pinskia at gcc dot gnu dot org 2008-05-17 13:42 ---
Hmm, va_arg actually expands to use aliasing set 0.
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=36255
--- Comment #7 from rguenth at gcc dot gnu dot org 2008-05-17 13:52 ---
Created an attachment (id=15652)
-- (http://gcc.gnu.org/bugzilla/attachment.cgi?id=15652action=view)
single-file testcase
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=36255
--- Comment #8 from rguenth at gcc dot gnu dot org 2008-05-17 13:52 ---
Confirmed.
--
rguenth at gcc dot gnu dot org changed:
What|Removed |Added
--- Comment #9 from rguenth at gcc dot gnu dot org 2008-05-17 18:03 ---
Hmm, if I properly add va_end (args) the bug is gone.
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=36255
--- 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
--- Comment #11 from rguenth at gcc dot gnu dot org 2008-05-17 18:21
---
Note that the missing va_end makes the testcase strictly invalid.
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=36255
--- Comment #12 from pinskia at gcc dot gnu dot org 2008-05-17 18:23
---
This is undefined code without va_end.
--
pinskia at gcc dot gnu dot org changed:
What|Removed |Added