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 #36 from Tobias Burnus <burnus at gcc dot gnu.org> 2012-02-03 15:05:55 UTC ---
I lost a bit the overview, but I think the following still needs to be done:

- 4.4/4.5/4.6: Backporting the fix for nonpresent actuals to elemental procs,
  cf. commit in comment 5 / comment 6. That is a true [4.4-4.6] regression

- 4.6: Backporting for the fix for unallocated/unassociated variables to
  elemental procedures. That's not a true regression.


- The test case of comment 13  / attachment 26291
  with the test-case corrections of comment 22
  This test case still fails. There are some draft patches for that in this PR.

- The test case of comment 23 / attachment 26392
  "sub_ctae" is invalid in needs to be removed. The test case compiles without
  any problems, but the program segfaults at run time for:
    call sub_ct(var1)
    call sub_ct(var2)
  if the variables aren't allocated. That seems to be the same issue as
  comment 31. Namely: The present() check does not work for CLASS.


- For the following, a test case should be written, tested, and included
  in the test suite (partially covered by the tests above):

  OPTIONAL dummy argument:
    - actual argument not present (i.e. compiler added null), "NULL()",
      nonallocated actual, nonassociated actual. But also: Actual present.
    - Actual argument a scalar or an array
    - Actual argument CLASS or TYPE
    - Actual argument a variable or a derived-type component

  Dummy argument: CLASS or TYPE
  ELEMENTAL procedure with scalar
     or nonelemental with (scalar or) array dummy argument.

  For passing a CLASS actual to a TYPE dummy, see also PR 51514.


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