public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug fortran/98948] New: unexpected error in procedure pointer initialization or assignment with intrinsic
@ 2021-02-03  3:37 xiao.liu@compiler-dev.com
  2021-02-03  7:00 ` [Bug fortran/98948] " kargl at gcc dot gnu.org
                   ` (2 more replies)
  0 siblings, 3 replies; 4+ messages in thread
From: xiao.liu@compiler-dev.com @ 2021-02-03  3:37 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=98948

            Bug ID: 98948
           Summary: unexpected error in procedure pointer initialization
                    or assignment with intrinsic
           Product: gcc
           Version: 10.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: fortran
          Assignee: unassigned at gcc dot gnu.org
          Reporter: xiao.liu@compiler-dev.com
  Target Milestone: ---

the test case is:

program test
  implicit none
  procedure(real*4), pointer :: pf => ABS

  print *, pf(-6.5_4)
  if(pf(-6.5_4) /= ABS(-6.5_4)) STOP 1

  pf => ACOS
  print *, pf(0.54030231_4)
  if(pf(0.54030231_4) /= ACOS(0.54030231_4)) STOP 2

  print *, 'PASS'
end program


the error under gfortran 10.0 is:

bbb.f90:3:41:

    3 |   procedure(real*4), pointer :: pf => ABS
      |                                         1
Error: Symbol ‘abs’ at (1) has no IMPLICIT type
bbb.f90:8:12:

    8 |   pf => ACOS
      |            1
Error: Symbol ‘acos’ at (1) has no IMPLICIT type


If annotate those two if-stmt, the test case will function well. 
And the result is:
   6.50000000    
  0.999999940    
 PASS

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2021-02-04  0:47 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-02-03  3:37 [Bug fortran/98948] New: unexpected error in procedure pointer initialization or assignment with intrinsic xiao.liu@compiler-dev.com
2021-02-03  7:00 ` [Bug fortran/98948] " kargl at gcc dot gnu.org
2021-02-03  7:00 ` kargl at gcc dot gnu.org
2021-02-04  0:47 ` sgk at troutmask dot apl.washington.edu

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).