OpenCores
URL https://opencores.org/ocsvn/openrisc/openrisc/trunk

Subversion Repositories openrisc

[/] [openrisc/] [trunk/] [gnu-old/] [gcc-4.2.2/] [gcc/] [testsuite/] [gfortran.dg/] [nonreturning_statements.f90] - Rev 823

Go to most recent revision | 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

Go to most recent revision | Compare with Previous | Blame | View Log

powered by: WebSVN 2.1.0

© copyright 1999-2024 OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.