From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 5742 invoked by alias); 19 Mar 2014 21:22:57 -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 Received: (qmail 5706 invoked by uid 48); 19 Mar 2014 21:22:53 -0000 From: "daniel.kruegler at googlemail dot com" To: gcc-bugs@gcc.gnu.org Subject: [Bug libstdc++/60594] std::function of a type with a declared (but not defined) return type fails to compile Date: Wed, 19 Mar 2014 21:22:00 -0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: libstdc++ X-Bugzilla-Version: unknown X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: daniel.kruegler at googlemail dot com X-Bugzilla-Status: UNCONFIRMED X-Bugzilla-Priority: P3 X-Bugzilla-Assigned-To: unassigned at gcc dot gnu.org X-Bugzilla-Target-Milestone: --- X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: cc Message-ID: In-Reply-To: References: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Bugzilla-URL: http://gcc.gnu.org/bugzilla/ Auto-Submitted: auto-generated MIME-Version: 1.0 X-SW-Source: 2014-03/txt/msg01809.txt.bz2 http://gcc.gnu.org/bugzilla/show_bug.cgi?id=3D60594 Daniel Kr=C3=BCgler changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |daniel.kruegler@googlemail. | |com --- Comment #4 from Daniel Kr=C3=BCgler --- (In reply to Jonathan Wakely from comment #1) > Are you sure this is valid? I tend to say it is valid, see below for a further comment on this. > Instantiating std::function (like most std::lib > templates) with an incomplete type is undefined behaviour. Is the function > type bar() complete if bar is not complete? This is definitively true (i.e. bar() is a complete type), because function types are not affected by the definition of complete types, 3.9 p. says: "Incompletely defined object types and the void types are incomplete types (3.9.1)." I would say that the definition of "INVOKE(f, t1, t2, ..., tN, R)" is not well-defined for incomplete R (except when R=3D=3Dvoid) due to the "implicitly-convertible" constraint mentioned in 20.9.2 p2, but 20.9.11 doe= sn't seem to impose this constraint to hold when instantiating a std::function<>= . On the other hand the current std::function wording clearly is underspecified: There are several members that would require R to be a complete type. I don= 't think that the default constructor is one of these, though. Among the membe= rs where this is needed is IMO template function(F f); because the compile-time constraint "unless f is Callable (20.9.11.2) for argument types ArgTypes... and return type R." can only be deduced, if R is complete (modulo void again). >>From gcc-bugs-return-446941-listarch-gcc-bugs=gcc.gnu.org@gcc.gnu.org Wed Mar 19 21:30:40 2014 Return-Path: Delivered-To: listarch-gcc-bugs@gcc.gnu.org Received: (qmail 9421 invoked by alias); 19 Mar 2014 21:30:40 -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 Delivered-To: mailing list gcc-bugs@gcc.gnu.org Received: (qmail 9398 invoked by uid 48); 19 Mar 2014 21:30:37 -0000 From: "patnel97269-gfortran at yahoo dot fr" To: gcc-bugs@gcc.gnu.org Subject: [Bug fortran/60596] New: Inquire size for stream zero Date: Wed, 19 Mar 2014 21:30:00 -0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: new X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: fortran X-Bugzilla-Version: 4.8.2 X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: patnel97269-gfortran at yahoo dot fr X-Bugzilla-Status: UNCONFIRMED X-Bugzilla-Priority: P3 X-Bugzilla-Assigned-To: unassigned at gcc dot gnu.org X-Bugzilla-Target-Milestone: --- X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: bug_id short_desc product version bug_status bug_severity priority component assigned_to reporter attachments.created Message-ID: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: 7bit X-Bugzilla-URL: http://gcc.gnu.org/bugzilla/ Auto-Submitted: auto-generated MIME-Version: 1.0 X-SW-Source: 2014-03/txt/msg01810.txt.bz2 Content-length: 764 http://gcc.gnu.org/bugzilla/show_bug.cgi?id=60596 Bug ID: 60596 Summary: Inquire size for stream zero Product: gcc Version: 4.8.2 Status: UNCONFIRMED Severity: normal Priority: P3 Component: fortran Assignee: unassigned at gcc dot gnu.org Reporter: patnel97269-gfortran at yahoo dot fr Created attachment 32398 --> http://gcc.gnu.org/bugzilla/attachment.cgi?id=32398&action=edit program Hi all, When calling inquire for a stream size, the size is reported to be zero. In the intel fortran compiler the sizer is correctly reported. I attached a small program, and the necessary input file. Use that as < input : >ONE Homo sapiens alu Thanks.