This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug fortran/35681] wrong result for vector subscripted array expression in MVBITS
- From: "domob at gcc dot gnu dot org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 19 Oct 2008 16:16:24 -0000
- Subject: [Bug fortran/35681] wrong result for vector subscripted array expression in MVBITS
- References: <bug-35681-15620@http.gcc.gnu.org/bugzilla/>
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
------- 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