This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Change to gcc.dg/sibcall-[34].c


Hi Dave,

> Was it necessary to change the recurser_void[12] functions in
> gcc.dg/sibcall-[34].c from static to extern?  The causes the tests
> to fail on the 32-bit hpux port.  We can only do sibcalls to static
> functions on this port.

I apologize for breaking your port.  I sort of wanted to have 120%
guarantee that those two functions are not inlined, but, yes,
__attribute__((noinline)) should give 100%, and that's enough.

Confirmed that sibcall-[34].c still fail on h8300-elf with this patch.
Committed as obvious.

Kazu Hirata

2004-03-06  Kazu Hirata  <kazu@cs.umass.edu>

	* gcc.dg/sibcall-3.c (recurser_void1, recurser_void2): Make
	them static.
	* gcc.dg/sibcall-4.c (recurser_void1, recurser_void2): Likewise.

Index: sibcall-3.c
===================================================================
RCS file: /home/kazu/nobackup/gcc-cvs/gcc/gcc/testsuite/gcc.dg/sibcall-3.c,v
retrieving revision 1.4
diff -u -r1.4 sibcall-3.c
--- sibcall-3.c	29 Feb 2004 15:11:12 -0000	1.4
+++ sibcall-3.c	7 Mar 2004 00:46:15 -0000
@@ -13,8 +13,8 @@
    (except targets where the test does not work due to the return address
    not saved on the regular stack).  */
 
-extern void recurser_void1 (int);
-extern void recurser_void2 (int);
+static void recurser_void1 (int);
+static void recurser_void2 (int);
 extern void track (int);
 
 int main ()
@@ -27,7 +27,7 @@
    reasonably sure is to make them have the same contents (regarding the
    n tests).  */
 
-void __attribute__((noinline))
+static void __attribute__((noinline))
 recurser_void1 (int n)
 {
   if (n == 0 || n == 7 || n == 8)
@@ -39,7 +39,7 @@
   recurser_void2 (n + 1);
 }
 
-void __attribute__((noinline))
+static void __attribute__((noinline))
 recurser_void2 (int n)
 {
   if (n == 0 || n == 7 || n == 8)
Index: sibcall-4.c
===================================================================
RCS file: /home/kazu/nobackup/gcc-cvs/gcc/gcc/testsuite/gcc.dg/sibcall-4.c,v
retrieving revision 1.4
diff -u -r1.4 sibcall-4.c
--- sibcall-4.c	29 Feb 2004 15:11:12 -0000	1.4
+++ sibcall-4.c	7 Mar 2004 00:46:28 -0000
@@ -13,8 +13,8 @@
    (except targets where the test does not work due to the return address
    not saved on the regular stack).  */
 
-extern void recurser_void1 (void);
-extern void recurser_void2 (void);
+static void recurser_void1 (void);
+static void recurser_void2 (void);
 extern void track (void);
 
 int n = 0;
@@ -28,7 +28,7 @@
    reasonably sure is to make them have the same contents (regarding the
    n tests).  */
 
-void __attribute__((noinline))
+static void __attribute__((noinline))
 recurser_void1 (void)
 {
   if (n == 0 || n == 7 || n == 8)
@@ -40,7 +40,7 @@
   recurser_void2 ();
 }
 
-void __attribute__((noinline))
+static void __attribute__((noinline))
 recurser_void2 (void)
 {
   if (n == 0 || n == 7 || n == 8)


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]