Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(982)

Unified Diff: gcc/gcc/testsuite/gfortran.dg/proc_ptr_11.f90

Issue 3050029: [gcc] GCC 4.5.0=>4.5.1 (Closed) Base URL: ssh://git@gitrw.chromium.org:9222/nacl-toolchain.git
Patch Set: Created 10 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « gcc/gcc/testsuite/gfortran.dg/proc_decl_1.f90 ('k') | gcc/gcc/testsuite/gfortran.dg/proc_ptr_3.f90 » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: gcc/gcc/testsuite/gfortran.dg/proc_ptr_11.f90
diff --git a/gcc/gcc/testsuite/gfortran.dg/proc_ptr_11.f90 b/gcc/gcc/testsuite/gfortran.dg/proc_ptr_11.f90
index 69bf140b818c7775a6d3c8749acfd50dce9c0748..4e8b3c2531428260593f190478212cfad78165fa 100644
--- a/gcc/gcc/testsuite/gfortran.dg/proc_ptr_11.f90
+++ b/gcc/gcc/testsuite/gfortran.dg/proc_ptr_11.f90
@@ -16,13 +16,36 @@ program bsp
procedure( up ) , pointer :: pptr
procedure(isign), pointer :: q
- ! TODO. See PR 38290.
- !pptr => add ! { "Interfaces don't match" }
+ procedure(iabs),pointer :: p1
+ procedure(f), pointer :: p2
+
+ pointer :: p3
+ interface
+ function p3(x)
+ real(8) :: p3,x
+ intent(in) :: x
+ end function p3
+ end interface
+
+ pptr => add ! { dg-error "is not a subroutine" }
q => add
print *, pptr() ! { dg-error "is not a function" }
+ p1 => iabs
+ p2 => iabs
+ p1 => f
+ p2 => f
+ p2 => p1
+ p1 => p2
+
+ p1 => abs ! { dg-error "Type/kind mismatch in return value" }
+ p2 => abs ! { dg-error "Type/kind mismatch in return value" }
+
+ p3 => dsin
+ p3 => sin ! { dg-error "Type/kind mismatch in return value" }
+
contains
function add( a, b )
@@ -31,4 +54,9 @@ program bsp
add = a + b
end function add
+ integer function f(x)
+ integer,intent(in) :: x
+ f = 317 + x
+ end function
+
end program bsp
« no previous file with comments | « gcc/gcc/testsuite/gfortran.dg/proc_decl_1.f90 ('k') | gcc/gcc/testsuite/gfortran.dg/proc_ptr_3.f90 » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698