URL
https://opencores.org/ocsvn/openrisc/openrisc/trunk
Subversion Repositories openrisc
[/] [openrisc/] [trunk/] [gnu-dev/] [or1k-gcc/] [gcc/] [testsuite/] [gfortran.dg/] [function_optimize_5.f90] - Rev 694
Compare with Previous | Blame | View Log
! { dg-do compile }! { dg-options "-ffrontend-optimize -Wfunction-elimination" }! Check the -ffrontend-optimize (in the absence of -O) and! -Wfunction-elimination options.program mainimplicit nonereal, dimension(2,2) :: a, b, c, dinteger :: ireal :: x, zcharacter(60) :: linereal, external :: ext_funcinterfaceelemental function element(x)real, intent(in) :: xreal :: elemend function elementpure function mypure(x)real, intent(in) :: xinteger :: mypureend function mypureelemental impure function elem_impure(x)real, intent(in) :: xreal :: elem_impureend function elem_impureend interfacedata a /2., 3., 5., 7./data b /11., 13., 17., 23./write (unit=line, fmt='(4F7.2)') matmul(a,b) & ! { dg-warning "Removing call to function 'matmul'" }& + matmul(a,b)z = sin(x) + 2.0 + sin(x) ! { dg-warning "Removing call to function 'sin'" }print *,zx = ext_func(a) + 23 + ext_func(a)print *,d,xz = element(x) + element(x) ! { dg-warning "Removing call to function 'element'" }print *,zi = mypure(x) - mypure(x) ! { dg-warning "Removing call to function 'mypure'" }print *,iz = elem_impure(x) - elem_impure(x)print *,zend program main
