This is the mail archive of the
fortran@gcc.gnu.org
mailing list for the GNU Fortran project.
[patch fortran RFA] Tweak common_5.f and common_align_2.f90 for sh
- From: Kaz Kojima <kkojima at rr dot iij4u dot or dot jp>
- To: gcc-patches at gcc dot gnu dot org
- Cc: fortran at gcc dot gnu dot org
- Date: Tue, 04 Aug 2009 06:39:59 +0900 (JST)
- Subject: [patch fortran RFA] Tweak common_5.f and common_align_2.f90 for sh
Hi,
gfortran.dg/common_5.f and common_align_2.f90 fail on SH
because real*8 may not be aligned at 64-bit boundary on this
target and there are no "Padding"'s expected in these tests.
The attached patch adds -mdalign target option which makes
doubles aligned at 64-bit boundaries for sh*-*-*. The patch
is sanity checked on i686-pc-linux-gnu.
OK for trunk?
Regards,
kaz
--
2009-08-03 Kaz Kojima <kkojima@gcc.gnu.org>
* gfortran.dg/common_5.f: Add -mdalign for sh.
* gfortran.dg/common_align_2.f90: Likewise.
diff -upr ORIG/trunk/gcc/testsuite/gfortran.dg/common_5.f trunk/gcc/testsuite/gfortran.dg/common_5.f
--- ORIG/trunk/gcc/testsuite/gfortran.dg/common_5.f 2005-10-29 06:50:40.000000000 +0900
+++ trunk/gcc/testsuite/gfortran.dg/common_5.f 2009-08-03 10:40:03.000000000 +0900
@@ -1,4 +1,5 @@
C { dg-do compile }
+C { dg-options "-pedantic-errors -mdalign" { target sh*-*-* } }
C PR 20059
C Check that the warning for padding works correctly.
SUBROUTINE PLOTZ
diff -upr ORIG/trunk/gcc/testsuite/gfortran.dg/common_align_2.f90 trunk/gcc/testsuite/gfortran.dg/common_align_2.f90
--- ORIG/trunk/gcc/testsuite/gfortran.dg/common_align_2.f90 2009-04-06 09:22:28.000000000 +0900
+++ trunk/gcc/testsuite/gfortran.dg/common_align_2.f90 2009-08-03 10:41:03.000000000 +0900
@@ -1,4 +1,5 @@
! { dg-do run }
+! { dg-options "-pedantic-errors -mdalign" { target sh*-*-* } }
! Tests the fix for PR37614, in which the alignement of commons followed
! g77 rather than the standard or other compilers.
!