URL
https://opencores.org/ocsvn/openrisc_2011-10-31/openrisc_2011-10-31/trunk
Subversion Repositories openrisc_2011-10-31
[/] [openrisc/] [trunk/] [gnu-src/] [gcc-4.5.1/] [gcc/] [testsuite/] [gfortran.dg/] [nonreturning_statements.f90] - Rev 302
Compare with Previous | Blame | View Log
! { dg-final { scan-assembler-not "should_be_noreturn" } }
! PR 17758
! This checks that non-returning subroutines and statements
! really don't return by calling non-existing subroutines
! afterwards. These calls are supposed to be optimized away, so
! they won't show up in the generated assembly.
program main
character(len=5) :: c
c = '12345'
read(unit=c,fmt='(A)') i
select case(i)
case(1)
call abort
call abort_should_be_noreturn
case(2)
stop 65
call stop_numeric_should_be_noreturn
case(3)
stop "foobar"
call stop_string_should_be_noreturn
case(4)
call exit
call exit_should_be_noreturn
end select
end program main