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]

[PATCH, testsuite] XFAIL -fpic related failures for SPU


Hello,

support for position-independent code on the SPU is limited because the
run-time environments do not support applying load-time relocations.
GCC therefore will error when building an application with -fpic that
would require such relocations (e.g. when a static initializer refers
to a symbol address).

This error triggers in a number of test cases.  As this can really be
considered a bug (but one that will not get fixed any time soon), I've
simply XFAILed all such tests.  (Except for g++.dg/opt/vt1.C, which
needs to be skipped as it has a scan-assembler clause that will ERROR
because the assembler file was not generated, even if the test is
XFAILed ...)

Tested on spu-elf with no regressions, fixes the FAILs.

OK for mainline and the 4.3 branch?

Bye,
Ulrich


ChangeLog:

	* gcc.dg/pr28243.c: XFAIL on SPU.
	* gcc.dg/torture/pr25947-1.c: Likewise.
	* gcc.dg/20030702-1.c: Likewise.
	* g++.old-deja/g++.other/comdat5.C: Likewise.
	* g++.old-deja/g++.other/local-alloc1.C: Likewise.
	* g++.dg/opt/vt1.C: Skip on SPU.


Index: gcc/testsuite/gcc.dg/pr28243.c
===================================================================
*** gcc/testsuite/gcc.dg/pr28243.c	(revision 136680)
--- gcc/testsuite/gcc.dg/pr28243.c	(working copy)
***************
*** 4,9 ****
--- 4,10 ----
  /* { dg-do compile } */
  /* { dg-require-effective-target fpic } */
  /* { dg-options "-O2 -ftracer -fPIC" } */
+ /* { dg-xfail-if "creating run-time relocation" { spu-*-* } { "*" } { "" } } */
  
  struct displayfuncs {
    void (*init) ();
Index: gcc/testsuite/gcc.dg/torture/pr25947-1.c
===================================================================
*** gcc/testsuite/gcc.dg/torture/pr25947-1.c	(revision 136680)
--- gcc/testsuite/gcc.dg/torture/pr25947-1.c	(working copy)
***************
*** 1,5 ****
--- 1,6 ----
  /* PR target/25947: define_split in cris.md caused unrecognized insn.  */
  /* { dg-options "-fpic" { target fpic } } */
+ /* { dg-xfail-if "creating run-time relocation" { spu-*-* } { "-O0" } { "" } } */
  
  extern char *rl_line_buffer;
  extern int rl_point;
Index: gcc/testsuite/gcc.dg/20030702-1.c
===================================================================
*** gcc/testsuite/gcc.dg/20030702-1.c	(revision 136680)
--- gcc/testsuite/gcc.dg/20030702-1.c	(working copy)
***************
*** 2,7 ****
--- 2,8 ----
     correctly in combine.  */
  /* { dg-do compile { target fpic } } */
  /* { dg-options "-O2 -fpic -fprofile-arcs" } */
+ /* { dg-xfail-if "creating run-time relocation" { spu-*-* } { "*" } { "" } } */
  
  void test (void)
  {
Index: gcc/testsuite/g++.old-deja/g++.other/comdat5.C
===================================================================
*** gcc/testsuite/g++.old-deja/g++.other/comdat5.C	(revision 136680)
--- gcc/testsuite/g++.old-deja/g++.other/comdat5.C	(working copy)
***************
*** 2,6 ****
--- 2,7 ----
  // { dg-do link { target fpic } }
  // { dg-additional-sources " comdat5-aux.cc" }
  // { dg-options "-O2 -fPIC" }
+ // { dg-xfail-if "creating run-time relocation" { spu-*-* } { "*" } { "" } }
  
  #include "comdat4.C"
Index: gcc/testsuite/g++.old-deja/g++.other/local-alloc1.C
===================================================================
*** gcc/testsuite/g++.old-deja/g++.other/local-alloc1.C	(revision 136680)
--- gcc/testsuite/g++.old-deja/g++.other/local-alloc1.C	(working copy)
***************
*** 1,5 ****
--- 1,6 ----
  // { dg-do assemble { target fpic } }
  // { dg-options "-O0 -fpic" }
+ // { dg-xfail-if "creating run-time relocation" { spu-*-* } { "*" } { "" } }
  // Origin: Jakub Jelinek <jakub@redhat.com>
  
  struct bar {
Index: gcc/testsuite/g++.dg/opt/vt1.C
===================================================================
*** gcc/testsuite/g++.dg/opt/vt1.C	(revision 136680)
--- gcc/testsuite/g++.dg/opt/vt1.C	(working copy)
***************
*** 1,6 ****
--- 1,7 ----
  // Test whether vtable for S is not put into read-only section.
  // { dg-do compile { target fpic } }
  // { dg-options "-O2 -fpic -fno-rtti" }
+ // { dg-skip-if "creating run-time relocation" { spu-*-* } { "*" } { "" } }
  // Origin: Jakub Jelinek <jakub@redhat.com>
  
  struct S
-- 
  Dr. Ulrich Weigand
  GNU Toolchain for Linux on System z and Cell BE
  Ulrich.Weigand@de.ibm.com


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