From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 27715 invoked by alias); 22 May 2011 17:39:31 -0000 Received: (qmail 27706 invoked by uid 22791); 22 May 2011 17:39:30 -0000 X-SWARE-Spam-Status: No, hits=-2.7 required=5.0 tests=ALL_TRUSTED,AWL,BAYES_00 X-Spam-Check-By: sourceware.org Received: from localhost (HELO gcc.gnu.org) (127.0.0.1) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Sun, 22 May 2011 17:39:17 +0000 From: "janus at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug fortran/49112] Missing type-bound procedure, "duplicate save" warnings and internal compiler error X-Bugzilla-Reason: CC X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: fortran X-Bugzilla-Keywords: X-Bugzilla-Severity: major X-Bugzilla-Who: janus at gcc dot gnu.org X-Bugzilla-Status: UNCONFIRMED X-Bugzilla-Priority: P3 X-Bugzilla-Assigned-To: unassigned at gcc dot gnu.org X-Bugzilla-Target-Milestone: --- X-Bugzilla-Changed-Fields: CC Message-ID: In-Reply-To: References: X-Bugzilla-URL: http://gcc.gnu.org/bugzilla/ Auto-Submitted: auto-generated Content-Type: text/plain; charset="UTF-8" MIME-Version: 1.0 Date: Sun, 22 May 2011 17:41:00 -0000 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: 2011-05/txt/msg01961.txt.bz2 http://gcc.gnu.org/bugzilla/show_bug.cgi?id=49112 janus at gcc dot gnu.org changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |janus at gcc dot gnu.org --- Comment #3 from janus at gcc dot gnu.org 2011-05-22 17:26:49 UTC --- (In reply to comment #0) > ...:~$ gfortran -c test_gfortran_ice.f90 > test_gfortran_ice.f90:20.41: > > class(DateTime), intent(IN) :: dt > 1 > Warning: Duplicate SAVE attribute specified at (1) > test_gfortran_ice.f90:20.41: > > class(DateTime), intent(IN) :: dt > 1 > Warning: Duplicate SAVE attribute specified at (1) Here is a reduced test case for the duplicate SAVE attribute: module datetime_mod implicit none save type :: DateTime end type contains character function getString (dt) class(DateTime) :: dt end function end module At first glance I would save this is invalid, and should be rejected with an error. In particular, is it allowed to give a lonely SAVE statement? If yes, what effect should this have? Usually SAVE is specified as an attribute for a specific variable, right?