public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug fortran/40605]  New: -fcheck=pointer: Problems with OPTIONAL
@ 2009-07-01 12:44 burnus at gcc dot gnu dot org
  2009-07-01 13:03 ` [Bug fortran/40605] " burnus at gcc dot gnu dot org
                   ` (5 more replies)
  0 siblings, 6 replies; 7+ messages in thread
From: burnus at gcc dot gnu dot org @ 2009-07-01 12:44 UTC (permalink / raw)
  To: gcc-bugs

-fcheck=pointer gives a segfault for a not present actual argument. Fix:

+++ trans-expr.c        (working copy)
@@ -2778 +2778 @@ gfc_conv_procedure_call (gfc_se * se, gf
-      if (gfc_option.rtcheck & GFC_RTCHECK_POINTER)
+      if (gfc_option.rtcheck & GFC_RTCHECK_POINTER && e != NULL)

Test case:

      SUBROUTINE rw_inp(scpos)
      IMPLICIT NONE
      REAL scpos

      interface
        FUNCTION evaluateFirst(s,n)result(number)
          IMPLICIT NONE
          CHARACTER(len =*), INTENT(inout) :: s
          INTEGER,OPTIONAL                 :: n
          REAL                             :: number
        end function
      end interface

      CHARACTER(len=100) :: line
      scpos = evaluatefirst(line)
      END SUBROUTINE rw_inp


-- 
           Summary: -fcheck=pointer: Problems with OPTIONAL
           Product: gcc
           Version: 4.5.0
            Status: UNCONFIRMED
          Keywords: ice-on-valid-code
          Severity: normal
          Priority: P3
         Component: fortran
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: burnus at gcc dot gnu dot org


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=40605


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

end of thread, other threads:[~2009-07-09  9:57 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2009-07-01 12:44 [Bug fortran/40605] New: -fcheck=pointer: Problems with OPTIONAL burnus at gcc dot gnu dot org
2009-07-01 13:03 ` [Bug fortran/40605] " burnus at gcc dot gnu dot org
2009-07-01 13:17 ` janus at gcc dot gnu dot org
2009-07-01 13:41 ` burnus at gcc dot gnu dot org
2009-07-01 14:37 ` burnus at gcc dot gnu dot org
2009-07-01 16:09 ` burnus at gcc dot gnu dot org
2009-07-09  9:57 ` burnus at gcc dot gnu dot org

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).