This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug fortran/50981] [4.4/4.5/4.6 Regression] Wrong-code for scalarizing ELEMENTAL call with absent OPTIONAL argument


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=50981

--- Comment #16 from Mikael Morin <mikael at gcc dot gnu.org> 2012-01-10 17:30:20 UTC ---
Created attachment 26296
  --> http://gcc.gnu.org/bugzilla/attachment.cgi?id=26296
Patch for the scalar cases, including the OOP ones (with CLASS).

This patch passes gfortran.dg/*elemental*, but fails on
gfortran.dg/class_array_{1,2,3,7,9}.f03.

I'm inclined to defer the handling of class cases to 4.8.

Regarding the patch itself:
 - there were some cases where code->expr1 didn't have the function reference,
and one had to look at code->resolved_sym to have the procedure's (or its
interface's) symbol.
 - the big condition in comment #12 has been trimmed, assuming that: 
      * dummy arguments of elemental procedures don't have the
pointer/allocatable attribute
      * gfc_expr_attr does the right thing w.r.t. class expressions
      * gfc_expr_attr does not propagate the pointer/allocatable/optional
attribute to subcomponents.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]