From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 24767 invoked by alias); 19 Oct 2008 16:17:44 -0000 Received: (qmail 24594 invoked by uid 48); 19 Oct 2008 16:16:24 -0000 Date: Sun, 19 Oct 2008 16:17:00 -0000 Message-ID: <20081019161624.24593.qmail@sourceware.org> X-Bugzilla-Reason: CC References: Subject: [Bug fortran/35681] wrong result for vector subscripted array expression in MVBITS In-Reply-To: Reply-To: gcc-bugzilla@gcc.gnu.org To: gcc-bugs@gcc.gnu.org From: "domob 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: 2008-10/txt/msg01260.txt.bz2 ------- Comment #14 from domob at gcc dot gnu dot org 2008-10-19 16:16 ------- Actually, the parentheses aren't lost and *do* get honoured, but the temporary is only inside the scalarization loop and thus not the full array temporary we want; the problem is that the actual argument expressions (and thus the EXPR_OP) gets translated inside gfc_conv_function_call which is only inside the scalarization loop for ELEMENTAL calls and thus only a scalar temporary. A possible approach for solving this problem in a way that looks more or less clean to me would be to translate call expression arguments in gfc_trans_call before gfc_conv_function_call, i.e. before even generating the ELEMENTAL scalarization loop. This would however of course be a somewhat intrusive patch and I want to make sure you agree with this plan. Or is there some other way I'm not aware of? I'm just thinking that moving this expression translation that would take care of parentheses and friends would not involve any "new" code but rather reorganize the existing one and thus utilize what's already there to its best. -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=35681