Patchwork [Fortran,committed] gfortran.dg/c_ptr_tests_16.f90 - fix endian issue

login
register
mail settings
Submitter Tobias Burnus
Date Dec. 20, 2010, 9:45 p.m.
Message ID <4D0FCE80.2010504@net-b.de>
Download mbox | patch
Permalink /patch/76236/
State New
Headers show

Comments

Tobias Burnus - Dec. 20, 2010, 9:45 p.m.

Patch

Index: gcc/testsuite/gfortran.dg/c_ptr_tests_16.f90
===================================================================
--- gcc/testsuite/gfortran.dg/c_ptr_tests_16.f90	(Revision 168094)
+++ gcc/testsuite/gfortran.dg/c_ptr_tests_16.f90	(Arbeitskopie)
@@ -10,7 +10,11 @@ 
   integer(c_intptr_t) :: a
   integer(transfer(transfer(4_c_intptr_t, c_null_ptr),1_c_intptr_t)) :: b
   a = transfer (transfer("ABCE", m), 1_c_intptr_t)
-  if (1162035777 /= a) call i_do_not_exist()
+  print '(z8)', a
+  if (     int(z'45434241') /= a  &
+     .and. int(z'41424345') /= a  &
+     .and. int(z'4142434500000000',kind=8) /= a) &
+    call i_do_not_exist()
 end program test
 
 ! Examples contributed by Steve Kargl and James Van Buskirk
Index: gcc/testsuite/ChangeLog
===================================================================
--- gcc/testsuite/ChangeLog	(Revision 168094)
+++ gcc/testsuite/ChangeLog	(Arbeitskopie)
@@ -1,3 +1,8 @@ 
+2010-12-20  Tobias Burnus  <burnus@net-b.de>
+
+	PR fortran/46974
+	* gfortran.dg/c_ptr_tests_16.f90: Fix endian issue.
+
 2010-12-19  John David Anglin  <dave.anglin@nrc-cnrc.gc.ca>
 
 	PR testsuite/45342