public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug fortran/29624]  New: Fortran 2003: Support intent for pointers
@ 2006-10-27 22:55 burnus at gcc dot gnu dot org
  2006-10-31  5:43 ` [Bug fortran/29624] " pault 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 @ 2006-10-27 22:55 UTC (permalink / raw)
  To: gcc-bugs

(Belongs to the features already implemented in several compilers, including
ifort, g95, NAG f95, absoft)

The INTENT applies to the value of the pointer, not the thing being pointed to.

Main points (from 5.1.2.7):

The INTENT (IN) attribute for a pointer dummy argument specifies that during
the execution of the procedure its association shall not be changed except that
it may become undefined if the target is deallocated other than through the
pointer.

The INTENT (OUT) attribute for a pointer dummy argument specifies that on
invocation of the procedure the pointer association status of the dummy
argument becomes undefined. Any actual argument associated with such a pointer
dummy shall be a pointer variable.

The INTENT (INOUT) attribute for a pointer dummy argument specifies that it is
intended for use both to receive a pointer association from and to return a
pointer association to the invoking scoping unit. Any actual argument
associated with such a pointer dummy shall be a pointer variable.


If a dummy argument is a derived-type object with a pointer component, then the
pointer as a pointer is a subobject of the dummy argument, but the target of
the pointer is not. Therefore, the restrictions on subobjects of the dummy
object apply to the pointer in contexts where it is used as a pointer, but not
in contexts where it is dereferenced to indicate its target.

Similarly, the INTENT restrictions on pointer dummy arguments apply only to the
association of the dummy argument; they do not restrict the operations allowed
on its target.

A pointer object with the INTENT (IN) attribute shall not appear as
(1) A pointer-object in a nullify-stmt,
(2) A data-pointer-object or proc-pointer-object in a pointer-assignment-stmt,
(3) An allocate-object in an allocate-stmt or deallocate-stmt, or
(4) An actual argument in a reference to a procedure if the associated dummy
argument is a pointer with the INTENT (OUT) or INTENT (INOUT) attribute.


-- 
           Summary: Fortran 2003: Support intent for pointers
           Product: gcc
           Version: 4.3.0
            Status: UNCONFIRMED
          Severity: enhancement
          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=29624


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

* [Bug fortran/29624] Fortran 2003: Support intent for pointers
  2006-10-27 22:55 [Bug fortran/29624] New: Fortran 2003: Support intent for pointers burnus at gcc dot gnu dot org
@ 2006-10-31  5:43 ` pault at gcc dot gnu dot org
  2006-10-31  5:44 ` pault at gcc dot gnu dot org
                   ` (4 subsequent siblings)
  5 siblings, 0 replies; 7+ messages in thread
From: pault at gcc dot gnu dot org @ 2006-10-31  5:43 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #1 from pault at gcc dot gnu dot org  2006-10-31 05:43 -------
Confirmed

Paul


-- 


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


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

* [Bug fortran/29624] Fortran 2003: Support intent for pointers
  2006-10-27 22:55 [Bug fortran/29624] New: Fortran 2003: Support intent for pointers burnus at gcc dot gnu dot org
  2006-10-31  5:43 ` [Bug fortran/29624] " pault at gcc dot gnu dot org
@ 2006-10-31  5:44 ` pault at gcc dot gnu dot org
  2006-12-12 11:26 ` patchapp at dberlin dot org
                   ` (3 subsequent siblings)
  5 siblings, 0 replies; 7+ messages in thread
From: pault at gcc dot gnu dot org @ 2006-10-31  5:44 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #2 from pault at gcc dot gnu dot org  2006-10-31 05:44 -------
It would help to confirm it!

Paul


-- 

pault at gcc dot gnu dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |NEW
     Ever Confirmed|0                           |1
   Last reconfirmed|0000-00-00 00:00:00         |2006-10-31 05:44:27
               date|                            |


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


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

* [Bug fortran/29624] Fortran 2003: Support intent for pointers
  2006-10-27 22:55 [Bug fortran/29624] New: Fortran 2003: Support intent for pointers burnus at gcc dot gnu dot org
  2006-10-31  5:43 ` [Bug fortran/29624] " pault at gcc dot gnu dot org
  2006-10-31  5:44 ` pault at gcc dot gnu dot org
@ 2006-12-12 11:26 ` patchapp at dberlin dot org
  2007-01-05  9:09 ` burnus at gcc dot gnu dot org
                   ` (2 subsequent siblings)
  5 siblings, 0 replies; 7+ messages in thread
From: patchapp at dberlin dot org @ 2006-12-12 11:26 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #3 from patchapp at dberlin dot org  2006-12-12 11:25 -------
Subject: Bug number PR29624

A patch for this bug has been added to the patch tracker.
The mailing list url for the patch is
http://gcc.gnu.org/ml/gcc-patches/2006-12/msg00827.html


-- 


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


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

* [Bug fortran/29624] Fortran 2003: Support intent for pointers
  2006-10-27 22:55 [Bug fortran/29624] New: Fortran 2003: Support intent for pointers burnus at gcc dot gnu dot org
                   ` (2 preceding siblings ...)
  2006-12-12 11:26 ` patchapp at dberlin dot org
@ 2007-01-05  9:09 ` burnus at gcc dot gnu dot org
  2007-01-05  9:20 ` burnus at gcc dot gnu dot org
  2007-01-10 19:07 ` pinskia at gcc dot gnu dot org
  5 siblings, 0 replies; 7+ messages in thread
From: burnus at gcc dot gnu dot org @ 2007-01-05  9:09 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #4 from burnus at gcc dot gnu dot org  2007-01-05 09:08 -------
Subject: Bug 29624

Author: burnus
Date: Fri Jan  5 09:08:37 2007
New Revision: 120472

URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=120472
Log:
fortran/
2007-01-05  Tobias Burnus  <burnus@net-b.de>

        PR fortran/29624
        * interface.c (compare_parameter_intent): New function.
          (check_intents): Support pointer intents.
        * symbol.c (check_conflict): Support pointer intents,
          better conflict_std message.
        * expr.c (gfc_check_assign,gfc_check_pointer_assign):
          Support pointer intents.
        * resolve.c (resolve_deallocate_expr,resolve_allocate_expr):
          Support pointer intents.

testsuite/
2006-01-05  Tobias Burnus  <burnus@net-b.de>

        PR fortran/29624
        * gfortran.dg/alloc_alloc_expr_1.f90: Add check for
          invalid deallocate.
        * gfortran.dg/allocatable_dummy_2.f90: Update dg-error.
        * gfortran.dg/protected_4.f90: Add pointer intent check.
        * gfortran.dg/protected_6.f90: Add pointer intent check.
        * gfortran.dg/pointer_intent_1.f90: New test.
        * gfortran.dg/pointer_intent_2.f90: New test.
        * gfortran.dg/pointer_intent_3.f90: New test.


Added:
    trunk/gcc/testsuite/gfortran.dg/pointer_intent_1.f90
    trunk/gcc/testsuite/gfortran.dg/pointer_intent_2.f90
    trunk/gcc/testsuite/gfortran.dg/pointer_intent_3.f90
Modified:
    trunk/gcc/fortran/ChangeLog
    trunk/gcc/fortran/expr.c
    trunk/gcc/fortran/interface.c
    trunk/gcc/fortran/resolve.c
    trunk/gcc/fortran/symbol.c
    trunk/gcc/testsuite/ChangeLog
    trunk/gcc/testsuite/gfortran.dg/alloc_alloc_expr_1.f90
    trunk/gcc/testsuite/gfortran.dg/allocatable_dummy_2.f90
    trunk/gcc/testsuite/gfortran.dg/protected_4.f90
    trunk/gcc/testsuite/gfortran.dg/protected_6.f90


-- 


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


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

* [Bug fortran/29624] Fortran 2003: Support intent for pointers
  2006-10-27 22:55 [Bug fortran/29624] New: Fortran 2003: Support intent for pointers burnus at gcc dot gnu dot org
                   ` (3 preceding siblings ...)
  2007-01-05  9:09 ` burnus at gcc dot gnu dot org
@ 2007-01-05  9:20 ` burnus at gcc dot gnu dot org
  2007-01-10 19:07 ` pinskia at gcc dot gnu dot org
  5 siblings, 0 replies; 7+ messages in thread
From: burnus at gcc dot gnu dot org @ 2007-01-05  9:20 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #5 from burnus at gcc dot gnu dot org  2007-01-05 09:20 -------
Fixed in 4.3.


-- 

burnus at gcc dot gnu dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |RESOLVED
         Resolution|                            |FIXED


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


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

* [Bug fortran/29624] Fortran 2003: Support intent for pointers
  2006-10-27 22:55 [Bug fortran/29624] New: Fortran 2003: Support intent for pointers burnus at gcc dot gnu dot org
                   ` (4 preceding siblings ...)
  2007-01-05  9:20 ` burnus at gcc dot gnu dot org
@ 2007-01-10 19:07 ` pinskia at gcc dot gnu dot org
  5 siblings, 0 replies; 7+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2007-01-10 19:07 UTC (permalink / raw)
  To: gcc-bugs



-- 

pinskia at gcc dot gnu dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
   Target Milestone|---                         |4.3.0


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


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

end of thread, other threads:[~2007-01-10 19:07 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2006-10-27 22:55 [Bug fortran/29624] New: Fortran 2003: Support intent for pointers burnus at gcc dot gnu dot org
2006-10-31  5:43 ` [Bug fortran/29624] " pault at gcc dot gnu dot org
2006-10-31  5:44 ` pault at gcc dot gnu dot org
2006-12-12 11:26 ` patchapp at dberlin dot org
2007-01-05  9:09 ` burnus at gcc dot gnu dot org
2007-01-05  9:20 ` burnus at gcc dot gnu dot org
2007-01-10 19:07 ` pinskia 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).