This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
S/390: Fix test cases for bi-arch s390x target
- From: "Ulrich Weigand" <Ulrich dot Weigand at de dot ibm dot com>
- To: gcc-patches at gcc dot gnu dot org
- Date: Mon, 21 Oct 2002 17:44:45 +0200
- Subject: S/390: Fix test cases for bi-arch s390x target
- Sensitivity:
Hello,
I've committed this patch that fixes two test cases that fail when running
with -m31 on s390x targets.
Tested on s390x-ibm-linux (with and without -m31).
ChangeLog:
* gcc.dg/weak/typeof-2.c: Handle s390x targets as well.
* gcc.misc-tests/linkage.exp: Handle s390x targets in -m31 mode.
Index: gcc/testsuite/gcc.dg/weak/typeof-2.c
===================================================================
RCS file: /cvs/gcc/gcc/gcc/testsuite/gcc.dg/weak/typeof-2.c,v
retrieving revision 1.3
diff -c -p -r1.3 typeof-2.c
*** gcc/testsuite/gcc.dg/weak/typeof-2.c 16 Oct 2002 21:25:26 -0000 1.3
--- gcc/testsuite/gcc.dg/weak/typeof-2.c 21 Oct 2002 13:01:07 -0000
*************** int bar3 (int x)
*** 32,36 ****
// { dg-final { if [string match sh-*-* $target_triplet ] {return} } }
// { dg-final { if [string match {sh[elb1-9]*-*-*} $target_triplet ] {return} } }
// Likewise for S/390 targets
! // { dg-final { if [string match s390-*-* $target_triplet ] {return} } }
// { dg-final { scan-assembler "baz3.*baz3.*baz3.*baz3.*baz3.*baz3" } }
--- 32,36 ----
// { dg-final { if [string match sh-*-* $target_triplet ] {return} } }
// { dg-final { if [string match {sh[elb1-9]*-*-*} $target_triplet ] {return} } }
// Likewise for S/390 targets
! // { dg-final { if [string match s390*-*-* $target_triplet ] {return} } }
// { dg-final { scan-assembler "baz3.*baz3.*baz3.*baz3.*baz3.*baz3" } }
Index: gcc/testsuite/gcc.misc-tests/linkage.exp
===================================================================
RCS file: /cvs/gcc/gcc/gcc/testsuite/gcc.misc-tests/linkage.exp,v
retrieving revision 1.9
diff -c -p -r1.9 linkage.exp
*** gcc/testsuite/gcc.misc-tests/linkage.exp 11 Jul 2002 18:56:57 -0000 1.9
--- gcc/testsuite/gcc.misc-tests/linkage.exp 21 Oct 2002 13:01:07 -0000
*************** if [isnative] then {
*** 48,53 ****
--- 48,59 ----
set native_cflags "-xarch=v9"
}
}
+ if [istarget "s390x-*-linux*"] {
+ set file_string [exec file "linkage-x.o"]
+ if [ string match "*32-bit*" $file_string ] {
+ set native_cflags "-m31"
+ }
+ }
catch { exec rm -f linkage-y.o }
send_log "cc -c $native_cflags $srcdir/$subdir/linkage-y.c >&/dev/null\n"
Mit freundlichen Gruessen / Best Regards
Ulrich Weigand
--
Dr. Ulrich Weigand
Linux for S/390 Design & Development
IBM Deutschland Entwicklung GmbH, Schoenaicher Str. 220, 71032 Boeblingen
Phone: +49-7031/16-3727 --- Email: Ulrich.Weigand@de.ibm.com