OSDN Git Service

Test int128 when -std=gnu
authorsaliu <saliu@138bc75d-0d04-0410-961f-82ee72b054a4>
Thu, 15 May 2008 13:00:08 +0000 (13:00 +0000)
committersaliu <saliu@138bc75d-0d04-0410-961f-82ee72b054a4>
Thu, 15 May 2008 13:00:08 +0000 (13:00 +0000)
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@135348 138bc75d-0d04-0410-961f-82ee72b054a4

gcc/testsuite/gfortran.dg/c_kind_int128_test2.f03 [new file with mode: 0644]

diff --git a/gcc/testsuite/gfortran.dg/c_kind_int128_test2.f03 b/gcc/testsuite/gfortran.dg/c_kind_int128_test2.f03
new file mode 100644 (file)
index 0000000..2f22b72
--- /dev/null
@@ -0,0 +1,16 @@
+! { dg-do run }
+! { dg-options "-std=gnu" }
+! { dg-require-effective-target fortran_integer_16 }
+!
+! Note: int_fast*_t currently not supported.
+
+program c_kind_int128
+  use, intrinsic :: iso_c_binding
+  integer(c_int128_t) :: a  
+  integer(c_int_least128_t) :: b  
+! integer(c_int_fast128_t) :: c
+    
+  if (sizeof (a) /= 16) call abort 
+  if (sizeof (b) /= 16) call abort 
+!  if (sizeof (c) /= 16) call abort 
+end program c_kind_int128