This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
new winline-7 test fails on 64-bit hosts
- From: Alan Modra <amodra at bigpond dot net dot au>
- To: gcc-patches at gcc dot gnu dot org
- Cc: jh at suse dot cz
- Date: Wed, 7 Jan 2004 23:10:53 +1030
- Subject: new winline-7 test fails on 64-bit hosts
On powerpc64, test fails with
In function `q':
7: warning: cast from pointer to integer of different size
6: warning: function 'q' can never be inlined because it uses alloca (override using the always_inline attribute)
In function `t':
6: warning: inlining failed in call to 'q': function not inlinable
11: warning: called from here
PASS: gcc.dg/winline-7.c (test for warnings, line 6)
PASS: gcc.dg/winline-7.c (test for warnings, line 11)
FAIL: gcc.dg/winline-7.c (test for excess errors)
Committing to mainline as obvious.
* gcc.dg/winline-7.c: Don't cast void* to int.
Index: gcc.dg/winline-7.c
===================================================================
RCS file: /cvs/gcc/gcc/gcc/testsuite/gcc.dg/winline-7.c,v
retrieving revision 1.1
diff -u -p -r1.1 winline-7.c
--- gcc.dg/winline-7.c 4 Jan 2004 14:39:13 -0000 1.1
+++ gcc.dg/winline-7.c 7 Jan 2004 12:22:53 -0000
@@ -2,11 +2,11 @@
/* { dg-options "-Winline -O2" } */
void big (void);
-inline int q(void)
+inline void *q (void)
{ /* { dg-warning "(function not inlinable|alloca)" } */
- return (int)alloca(10);
+ return alloca (10);
}
-inline int t (void)
+inline void *t (void)
{
return q (); /* { dg-warning "called from here" } */
}
--
Alan Modra
IBM OzLabs - Linux Technology Centre