public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug fortran/32535]  New: namelist with private items contained in sub-sub-procedure of a module rejected
@ 2007-06-28 12:12 burnus at gcc dot gnu dot org
  2007-07-08 21:06 ` [Bug fortran/32535] " patchapp at dberlin dot org
                   ` (2 more replies)
  0 siblings, 3 replies; 4+ messages in thread
From: burnus at gcc dot gnu dot org @ 2007-06-28 12:12 UTC (permalink / raw)
  To: gcc-bugs

Janus, how about submitting a patch for this bug including a testcase?

As Janus Weil found out:
http://gcc.gnu.org/ml/fortran/2007-06/msg00488.html

If a namelist in a procedure contained in a module procedure contains a private
item as element, a bogus error message is printed:
   Error: PRIVATE symbol 'r' cannot be member of PUBLIC namelist at (1)

This fails if the symbol is not in the parent, but in the parent->parent
namespace.
One solution would be to add
    && !(sym->ns->parent->parent == nl->sym->ns)

module mod
  real, private :: r
contains
  subroutine x
  contains
    subroutine y
      namelist /n/ r
    end subroutine y
  end subroutine x
end module mod
end


-- 
           Summary: namelist with private items contained in sub-sub-
                    procedure of a module rejected
           Product: gcc
           Version: 4.3.0
            Status: UNCONFIRMED
          Keywords: rejects-valid
          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=32535


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

* [Bug fortran/32535] namelist with private items contained in sub-sub-procedure of a module rejected
  2007-06-28 12:12 [Bug fortran/32535] New: namelist with private items contained in sub-sub-procedure of a module rejected burnus at gcc dot gnu dot org
@ 2007-07-08 21:06 ` patchapp at dberlin dot org
  2007-07-17 21:33 ` burnus at gcc dot gnu dot org
  2007-07-17 21:34 ` burnus at gcc dot gnu dot org
  2 siblings, 0 replies; 4+ messages in thread
From: patchapp at dberlin dot org @ 2007-07-08 21:06 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #1 from patchapp at dberlin dot org  2007-07-08 21:06 -------
Subject: Bug number PR 32535

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/2007-07/msg00650.html


-- 


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


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

* [Bug fortran/32535] namelist with private items contained in sub-sub-procedure of a module rejected
  2007-06-28 12:12 [Bug fortran/32535] New: namelist with private items contained in sub-sub-procedure of a module rejected burnus at gcc dot gnu dot org
  2007-07-08 21:06 ` [Bug fortran/32535] " patchapp at dberlin dot org
@ 2007-07-17 21:33 ` burnus at gcc dot gnu dot org
  2007-07-17 21:34 ` burnus at gcc dot gnu dot org
  2 siblings, 0 replies; 4+ messages in thread
From: burnus at gcc dot gnu dot org @ 2007-07-17 21:33 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #2 from burnus at gcc dot gnu dot org  2007-07-17 21:33 -------
Subject: Bug 32535

Author: burnus
Date: Tue Jul 17 21:33:34 2007
New Revision: 126706

URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=126706
Log:
2007-07-17  Janus Weil  <jaydub66@gmail.com>

        PR fortran/32535
        * resolve.c (resolve_fl_namelist): Check for namelist private
        components in contained subprograms.

2007-07-17  Janus Weil  <jaydub66@gmail.com>

        PR fortran/32535
        * gfortran.dg/pr32535.f90: New test.


Added:
    trunk/gcc/testsuite/gfortran.dg/pr32535.f90
Modified:
    trunk/gcc/fortran/ChangeLog
    trunk/gcc/fortran/resolve.c
    trunk/gcc/testsuite/ChangeLog


-- 


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


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

* [Bug fortran/32535] namelist with private items contained in sub-sub-procedure of a module rejected
  2007-06-28 12:12 [Bug fortran/32535] New: namelist with private items contained in sub-sub-procedure of a module rejected burnus at gcc dot gnu dot org
  2007-07-08 21:06 ` [Bug fortran/32535] " patchapp at dberlin dot org
  2007-07-17 21:33 ` burnus at gcc dot gnu dot org
@ 2007-07-17 21:34 ` burnus at gcc dot gnu dot org
  2 siblings, 0 replies; 4+ messages in thread
From: burnus at gcc dot gnu dot org @ 2007-07-17 21:34 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #3 from burnus at gcc dot gnu dot org  2007-07-17 21:34 -------
FIXED in the trunk; no regression => no backporting.


-- 

burnus at gcc dot gnu dot org changed:

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


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


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

end of thread, other threads:[~2007-07-17 21:34 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2007-06-28 12:12 [Bug fortran/32535] New: namelist with private items contained in sub-sub-procedure of a module rejected burnus at gcc dot gnu dot org
2007-07-08 21:06 ` [Bug fortran/32535] " patchapp at dberlin dot org
2007-07-17 21:33 ` burnus at gcc dot gnu dot org
2007-07-17 21:34 ` 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).