diff options
author | bstarynk <bstarynk@138bc75d-0d04-0410-961f-82ee72b054a4> | 2008-07-29 15:47:54 +0000 |
---|---|---|
committer | bstarynk <bstarynk@138bc75d-0d04-0410-961f-82ee72b054a4> | 2008-07-29 15:47:54 +0000 |
commit | 81bdf64f2035b8979549fc533915ea17d429dc9f (patch) | |
tree | 69e2b47b22500339535d6f5f37e3fca2350d4f3a /gcc/testsuite/gfortran.dg/intrinsic_std_4.f90 | |
parent | 7f1c23c2e7981438c251121d85cf5d807b9a4f5d (diff) | |
download | gcc-81bdf64f2035b8979549fc533915ea17d429dc9f.tar.gz |
2008-07-29 Basile Starynkevitch <basile@starynkevitch.net>
MELT branch merged with trunk r138226 [after tuple merge into trunk]
some compiler probe stuff are missing
* gcc/compiler-probe.h: more gimple, less tree
* gcc/compiler-probe.c: incomplete merge.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/branches/melt-branch@138247 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/testsuite/gfortran.dg/intrinsic_std_4.f90')
-rw-r--r-- | gcc/testsuite/gfortran.dg/intrinsic_std_4.f90 | 46 |
1 files changed, 46 insertions, 0 deletions
diff --git a/gcc/testsuite/gfortran.dg/intrinsic_std_4.f90 b/gcc/testsuite/gfortran.dg/intrinsic_std_4.f90 new file mode 100644 index 00000000000..e83ed4c884d --- /dev/null +++ b/gcc/testsuite/gfortran.dg/intrinsic_std_4.f90 @@ -0,0 +1,46 @@ +! { dg-do run } +! { dg-options "-std=f95 -Wno-intrinsics-std" } + +! PR fortran/33141 +! Check that calls to intrinsics not in the current standard are "allowed" and +! linked to external procedures with that name. +! Addionally, this checks that -Wno-intrinsics-std turns off the warning. + +SUBROUTINE abort () + IMPLICIT NONE + WRITE (*,*) "Correct" +END SUBROUTINE abort + +REAL FUNCTION asinh (arg) + IMPLICIT NONE + REAL :: arg + + WRITE (*,*) "Correct" + asinh = arg +END FUNCTION asinh + +SUBROUTINE implicit_none + IMPLICIT NONE + REAL :: asinh ! { dg-bogus "Fortran 2008" } + REAL :: x + + ! Both times our version above should be called + CALL abort () ! { dg-bogus "extension" } + x = ASINH (1.) ! { dg-bogus "Fortran 2008" } +END SUBROUTINE implicit_none + +SUBROUTINE implicit_type + ! ASINH has implicit type here + REAL :: x + + ! Our version should be called + x = ASINH (1.) ! { dg-bogus "Fortran 2008" } +END SUBROUTINE implicit_type + +PROGRAM main + ! This should give a total of three "Correct"s + CALL implicit_none () + CALL implicit_type () +END PROGRAM main + +! { dg-output "Correct\.*Correct\.*Correct" } |