Patchwork [testsuite] Several IRIX 6 testsuite fixes

login
register
mail settings
Submitter Rainer Orth
Date Nov. 12, 2010, 10:50 a.m.
Message ID <yddr5eq7r4v.fsf@manam.CeBiTec.Uni-Bielefeld.DE>
Download mbox | patch
Permalink /patch/70953/
State New
Headers show

Comments

Rainer Orth - Nov. 12, 2010, 10:50 a.m.
The following patch fixes a couple of IRIX 6.5 testsuite failures:

* All the constructor priority tests were failing because SGI ld doesn't
  support support that.  This would only work with GNU ld, but bootstrap
  with gld currently fails.

* Several testcases currently fail since the SGI linker produces a
  multiline warning:

ld32: WARNING 47 : This module (cp_compat_y_tst.o .text) contains branch instruction(s)
		   that might degrade performance on an older version (rev. 2.2) R4000 processor.

  The first line is already pruned by DejaGnu's target.exp, but the
  second is not.  The patch below does this in prune.exp; I'll submit it
  upstream as well.

* g++.dg/abi/packed1.C produces the same warning as a couple of other
  targets:

/vol/gcc/src/hg/trunk/irix/gcc/testsuite/g++.dg/abi/packed1.C:7:8: warning: packed attribute causes inefficient alignment for 'INNER::_vptr.INNER' [-Wattributes]

* IRIX doesn't define HANDLE_PRAGMA_PUSH_POP, so skip
  g++.dg/cpp/_Pragma1.C.

* gcc.target/mips/call-3.c uses the visibility attribute without
  declaring that.  Since this is not supported on IRIX, the test failed.

Bootstrapped without regressions on mips-sgi-irix6.5, installed.  Will
backport to 4.4 and 4.5 branches after some soak time.

	Rainer


2010-04-12  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>

	gcc:
	* config/mips/iris6.h [!IRIX_USING_GNU_LD]
	(SUPPORTS_INIT_PRIORITY): Define.

	gcc/testsuite:
	* lib/prune.exp (prune_gcc_output): Ignore IRIX 6 linker multiline
	warning.
	* g++.dg/abi/packed1.C (struct INNER): Ignore warning on
	mips-sgi-irix*.
	* g++.dg/cpp/_Pragma1.C: Skip on mips-sgi-irix*.
	* gcc.target/mips/call-3.c: Add dg-require-visibility.

Patch

diff -r d3034f477af0 gcc/config/mips/iris6.h
--- a/gcc/config/mips/iris6.h	Sun Nov 07 13:26:44 2010 +0100
+++ b/gcc/config/mips/iris6.h	Mon Nov 08 10:43:28 2010 +0100
@@ -311,6 +311,11 @@ 
    library search directories.  */
 #define LINK_ELIMINATE_DUPLICATE_LDIRECTORIES 1
 
+/* The SGI linker doesn't understand constructor priorities.  */
+#ifndef IRIX_USING_GNU_LD
+#define SUPPORTS_INIT_PRIORITY 0
+#endif
+
 /* Add -g to mips.h default to avoid confusing gas with local symbols
    generated from stabs info.  */
 #undef NM_FLAGS
diff -r d3034f477af0 gcc/testsuite/g++.dg/abi/packed1.C
--- a/gcc/testsuite/g++.dg/abi/packed1.C	Sun Nov 07 13:26:44 2010 +0100
+++ b/gcc/testsuite/g++.dg/abi/packed1.C	Mon Nov 08 10:43:28 2010 +0100
@@ -4,7 +4,7 @@ 
 
 extern "C" void abort ();
 
-struct INNER { // { dg-warning "inefficient.*vptr" "" { target alpha*-*-* ia64-*-* hppa*-*-* sparc*-*-* sh*-*-* } }
+struct INNER { // { dg-warning "inefficient.*vptr" "" { target alpha*-*-* ia64-*-* hppa*-*-* mips-sgi-irix* sparc*-*-* sh*-*-* } }
   virtual int foo() const { return 1; }
 } __attribute__ ((packed));
 
diff -r d3034f477af0 gcc/testsuite/g++.dg/cpp/_Pragma1.C
--- a/gcc/testsuite/g++.dg/cpp/_Pragma1.C	Sun Nov 07 13:26:44 2010 +0100
+++ b/gcc/testsuite/g++.dg/cpp/_Pragma1.C	Mon Nov 08 10:43:28 2010 +0100
@@ -2,7 +2,7 @@ 
 // This is supposed to succeed only if
 // the target defines HANDLE_PRAGMA_PACK_PUSH_POP 
 // and doesn't define HANDLE_PRAGMA_PACK_WITH_EXPANSION.
-// { dg-do compile { target { ! { powerpc-ibm-aix* *-*-solaris2* fido-*-* m68k-*-* sh*-[us]*-elf m32c-*-* *-*-vxworks alpha*-dec-osf* } } } }
+// { dg-do compile { target { ! { powerpc-ibm-aix* *-*-solaris2* fido-*-* m68k-*-* mips-sgi-irix* sh*-[us]*-elf m32c-*-* *-*-vxworks alpha*-dec-osf* } } } }
 
 #define push bar
 #define foo _Pragma ("pack(push)")
diff -r d3034f477af0 gcc/testsuite/gcc.target/mips/call-3.c
--- a/gcc/testsuite/gcc.target/mips/call-3.c	Sun Nov 07 13:26:44 2010 +0100
+++ b/gcc/testsuite/gcc.target/mips/call-3.c	Mon Nov 08 10:43:28 2010 +0100
@@ -1,5 +1,6 @@ 
 /* { dg-options "-O2 -mrelax-pic-calls -mno-shared" } */
 /* { dg-final { scan-assembler "\\.reloc\t1f,R_MIPS_JALR,g\n1:\tjalr\t" } } */
+/* { dg-require-visibility "" } */
 
 __attribute__ ((visibility ("hidden"))) void g ();
 
diff -r d3034f477af0 gcc/testsuite/lib/prune.exp
--- a/gcc/testsuite/lib/prune.exp	Sun Nov 07 13:26:44 2010 +0100
+++ b/gcc/testsuite/lib/prune.exp	Mon Nov 08 10:43:28 2010 +0100
@@ -1,4 +1,4 @@ 
-#   Copyright (C) 1997, 1999, 2000, 2002, 2004, 2007, 2008
+#   Copyright (C) 1997, 1999, 2000, 2002, 2004, 2007, 2008, 2010
 #   Free Software Foundation, Inc.
 
 # This program is free software; you can redistribute it and/or modify
@@ -38,6 +38,9 @@ 
     regsub -all "(^|\n)\[^\n\]*: Additional NOP may be necessary to workaround Itanium processor A/B step errata" $text "" text
     regsub -all "(^|\n)\[^\n*\]*: Assembler messages:\[^\n\]*" $text "" text
 
+    # Ignore second line of IRIX 6 linker multiline message.
+    regsub -all "(^|\n)\[ \t\]*that might degrade performance on an older version \\(rev. 2.2\\) R4000 processor.\[^\n\]*" $text "" text
+
     # Ignore harmless VTA note.
     regsub -all "(^|\n)\[^\n\]*: note: variable tracking size limit exceeded with -fvar-tracking-assignments, retrying without\[^\n\]*" $text "" text