"Joseph S. Myers" <jos...@codesourcery.com> wrote: > Yes, that testcase looks like what I had in mind, but you don't need the > dg-* directives (the defaults in gcc.c-torture/compile should be fine). > >> BTW, is it valid C? > > I think this should be considered the same as passing a type such as > "short" that can never be the promoted argument type: undefined behavior > at runtime if the call is executed.
Thanks for the explanation. I've committed the testcase below on trunk. Regards, kaz -- 2011-04-27 Kaz Kojima <kkoj...@gcc.gnu.org> PR target/48767 * gcc.c-torture/compile/pr48767.c: New test. diff -uprN ORIG/trunk/gcc/testsuite/gcc.c-torture/compile/pr48767.c trunk/gcc/testsuite/gcc.c-torture/compile/pr48767.c --- ORIG/trunk/gcc/testsuite/gcc.c-torture/compile/pr48767.c 1970-01-01 09:00:00.000000000 +0900 +++ trunk/gcc/testsuite/gcc.c-torture/compile/pr48767.c 2011-04-27 19:28:47.000000000 +0900 @@ -0,0 +1,7 @@ +/* PR target/48767 */ + +void +foo (__builtin_va_list ap) +{ + __builtin_va_arg (ap, void); +}