Simple Fortran test for --int64, without math libraries
This commit is contained in:
		
							
								
								
									
										1
									
								
								test/fc_int64/src/CMakeLists.txt
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										1
									
								
								test/fc_int64/src/CMakeLists.txt
									
									
									
									
									
										Normal file
									
								
							| @@ -0,0 +1 @@ | ||||
| add_executable(example example.f90) | ||||
							
								
								
									
										14
									
								
								test/fc_int64/src/example.f90
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										14
									
								
								test/fc_int64/src/example.f90
									
									
									
									
									
										Normal file
									
								
							| @@ -0,0 +1,14 @@ | ||||
| program example | ||||
|    implicit none | ||||
|    ! max i*4 is 2,147,483,647, add 1 for i*8 | ||||
|    integer*8, parameter :: i8ref = 2147483648 | ||||
|    integer :: i | ||||
|    logical :: test_ok | ||||
|    i=i8ref | ||||
|    test_ok = (sizeof(i) == 8 .and. i == 2147483648) | ||||
|    if (test_ok) then | ||||
|       print *,"test_int64 ok" | ||||
|    else | ||||
|       stop "test_int64 failed!" | ||||
|    endif | ||||
| end program | ||||
		Reference in New Issue
	
	Block a user