From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 10860 invoked by alias); 18 Apr 2009 20:36:19 -0000 Received: (qmail 10717 invoked by uid 48); 18 Apr 2009 20:36:01 -0000 Date: Sat, 18 Apr 2009 20:36:00 -0000 Message-ID: <20090418203601.10716.qmail@sourceware.org> X-Bugzilla-Reason: CC References: Subject: [Bug fortran/39800] Rejects PRIVATE TYPE as compont of local type declaration In-Reply-To: Reply-To: gcc-bugzilla@gcc.gnu.org To: gcc-bugs@gcc.gnu.org From: "burnus at gcc dot gnu dot org" Mailing-List: contact gcc-bugs-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Archive: List-Post: List-Help: Sender: gcc-bugs-owner@gcc.gnu.org X-SW-Source: 2009-04/txt/msg01559.txt.bz2 ------- Comment #3 from burnus at gcc dot gnu dot org 2009-04-18 20:35 ------- > > Thus there are two bugs: > > - Local TYPE declarations in procedures are wrongly rejected > by local, I suppose that you mean host associated? No, I mean: subroutine sub() TYPE :: new_local_type type(foo) :: x Here, it does not matter whether "foo" is host or use associated or has a local scope. It is simply a TYPE which is entirely restricted to "sub" and procedures contained in "sub" and thus there cannot be any use-association problem. A different matter is: subroutine sub2(x) TYPE :: local_type; SEQUENCE; type(foo) :: y; end type type(local_type) :: x Then the problem (in F95) is that "x" is a dummy while type(local_type) contains a private element. Gfortran properly rejects this with -std=f95 and accepts it otherwise. > I would put the first bug as being very high in embarrassment:-( Indeed. I'm surprised that it did not appear earlier, but I checked: it is not a regression. -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=39800