From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 72936 invoked by alias); 23 Mar 2015 08:27:12 -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 72627 invoked by uid 55); 23 Mar 2015 08:27:08 -0000 From: "paul.richard.thomas at gmail dot com" To: gcc-bugs@gcc.gnu.org Subject: [Bug fortran/64952] Missing temporary in assignment from elemental function Date: Mon, 23 Mar 2015 09:35:00 -0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: fortran X-Bugzilla-Version: 5.0 X-Bugzilla-Keywords: wrong-code X-Bugzilla-Severity: normal X-Bugzilla-Who: paul.richard.thomas at gmail dot com X-Bugzilla-Status: NEW X-Bugzilla-Priority: P3 X-Bugzilla-Assigned-To: pault at gcc dot gnu.org X-Bugzilla-Target-Milestone: --- X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: Message-ID: In-Reply-To: References: 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: 2015-03/txt/msg02330.txt.bz2 https://gcc.gnu.org/bugzilla/show_bug.cgi?id=64952 --- Comment #6 from paul.richard.thomas at gmail dot com --- Dear Mikael, The pureness is also confused by the C pure, which is whiter than white pure. I agree with your last remark about the standards committee needing to reflect on this. Thanks for finishing the job. Will you post a message on the clf thread, or would you like me to do it? Paul On 8 February 2015 at 14:00, mikael at gcc dot gnu.org wrote: > https://gcc.gnu.org/bugzilla/show_bug.cgi?id=64952 > > --- Comment #4 from Mikael Morin --- > Hello Paul, > > setting potentially_aliased should be done inside > gfc_walk_elemental_function_args, as the ss argument may be returned > unmodified. > In fact, I think it's better to do all the trans-array.c code inside > gfc_conv_resolve_dependencies without adding the gfc_ss_info flag. > > There is also the case of typebound procedures and procedure pointer > components, > for which we should generate a temporary in any case. > > I think this case is something that was overlooked by the standard commitee > when they introduced the PURE attribute. Maybe they can provide some kind of > "REALLY_PURE" attribute (or PURE ELEMENTAL, different from regular ELEMENTAL) > that avoids generating temporaries everywhere? > Or maybe the function Fred should bee IMPURE ELEMENTAL? > > Anyway, I think we should not rush to fix this before we are sure that the > standard committee really expects temporaries (almost) everywhere array > elemental functions are involved. > > -- > You are receiving this mail because: > You are on the CC list for the bug. > You are the assignee for the bug. > You reported the bug.