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: RFA: fix gcc.dg/torture/builtin-noret-2.c for sh-elf


Eric Christopher wrote:
> 
> > Another note on your original patch: whatever ends up being done, I
> > think _Exit needs the same treatment.
> 
> Yes. This'll fix a failure on mips.

Ok, attached is an updated patch.  This also supercedes
http://gcc.gnu.org/ml/gcc-patches/2003-05/msg01858.html .
	
-- 
--------------------------
SuperH (UK) Ltd.
2410 Aztec West / Almondsbury / BRISTOL / BS32 4QX
T:+44 1454 465658
2003-05-30  J"orn Rennecke <joern.rennecke@superh.com>

	* gcc.dg/torture/builtin-noret-1.c (_exit, _Exit): Make weak.
	* gcc.dg/torture/builtin-noret-2.c (_exit, _Exit): Likewise.

Index: builtin-noret-1.c
===================================================================
RCS file: /cvs/gcc/gcc/gcc/testsuite/gcc.dg/torture/builtin-noret-1.c,v
retrieving revision 1.2
diff -p -r1.2 builtin-noret-1.c
*** builtin-noret-1.c	24 May 2003 06:04:35 -0000	1.2
--- builtin-noret-1.c	30 May 2003 15:13:30 -0000
*************** extern void t_Exit (void);
*** 15,20 ****
--- 15,25 ----
  
  extern void link_failure (void);
  
+ /* Some libcs have _exit and/or _Exit, and won't allow it to be re-defined,
+    so make it weak.  */
+ #pragma weak _exit
+ #pragma weak _Exit
+ 
  int
  main (void)
  {
Index: builtin-noret-2.c
===================================================================
RCS file: /cvs/gcc/gcc/gcc/testsuite/gcc.dg/torture/builtin-noret-2.c,v
retrieving revision 1.2
diff -p -r1.2 builtin-noret-2.c
*** builtin-noret-2.c	24 May 2003 06:04:35 -0000	1.2
--- builtin-noret-2.c	30 May 2003 15:13:30 -0000
*************** void
*** 46,56 ****
--- 46,62 ----
  t_exit (void)
  {
    extern void _exit (int);
+   /* Some non-Unix libcs have _exit, and won't allow it to be re-defined,
+      so make it weak.  */
+ #pragma weak _exit
    _exit (1);
    link_failure ();
  }
  
  /* Some non-Unix libcs might not have _exit.  */
+ /* Some non-Unix libcs have _exit, and won't allow it to be re-defined,
+    so make it weak.  */
+ #pragma weak _exit
  void
  _exit (int i)
  {
*************** void
*** 61,71 ****
--- 67,83 ----
  t_Exit (void)
  {
    extern void _Exit (int);
+   /* Some libcs have _Exit, and won't allow it to be re-defined,
+      so make it weak.  */
+ #pragma weak _Exit
    _Exit (1);
    link_failure ();
  }
  
  /* Some libcs might not have _Exit.  */
+ /* Some libcs have _Exit, and won't allow it to be re-defined,
+    so make it weak.  */
+ #pragma weak _Exit
  void
  _Exit (int i)
  {

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