This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [PATCH] Fix PR32493, bring back inlining of varargs functions
- From: Rask Ingemann Lambertsen <rask at sygehus dot dk>
- To: Richard Guenther <rguenther at suse dot de>
- Cc: gcc-patches at gcc dot gnu dot org
- Date: Tue, 17 Jul 2007 17:59:32 +0200
- Subject: Re: [PATCH] Fix PR32493, bring back inlining of varargs functions
- References: <Pine.LNX.4.64.0706291536560.24708@zhemvz.fhfr.qr>
On Fri, Jun 29, 2007 at 03:40:15PM +0200, Richard Guenther wrote:
> Index: testsuite/gcc.dg/inline-23.c
> ===================================================================
> *** testsuite/gcc.dg/inline-23.c (revision 0)
> --- testsuite/gcc.dg/inline-23.c (revision 0)
> ***************
> *** 0 ****
> --- 1,17 ----
> + /* { dg-do compile } */
> + /* { dg-options "-std=gnu89" } */
> + /* Make sure we can inline a varargs function whose variable arguments
> + are not used. See PR32493. */
> + static inline __attribute__((always_inline)) void __check_printsym_format(const
> + char *fmt, ...)
> + {
> + }
> + static inline __attribute__((always_inline)) void print_symbol(const char *fmt,
> + unsigned long addr)
> + {
> + __check_printsym_format(fmt, "");
> + }
> + void do_initcalls(void **call)
> + {
> + print_symbol(": %s()", (unsigned long) *call);
> + }
This testcase fails on targets with e.g. 16-bit pointers and 32-bit long
ints:
.../gcc/testsuite/gcc.dg/inline-23.c: In function 'do_initcalls':
.../gcc/testsuite/gcc.dg/inline-23.c:16: warning: cast from pointer to integer of different size
--
Rask Ingemann Lambertsen