Hi Tobias,

Am 02.10.21 um 20:29 schrieb Tobias Burnus:
On 02.10.21 20:01, Sandra Loosemore wrote:
On 9/29/21 2:53 AM, Tobias Burnus wrote:
There are three issues, this patch solves the first:
* reject-valid issue due to adding the initializer also to a dummy
   argument which is in an INTERFACE block. Having initializers in
   INTERFACE blocks is pointless and causes for the attached testcase
   the bogus error:
   "Assumed-rank variable y at (1) may only be used as actual argument"
...
This has indeed allowed me to make progress on adding the diagnostic, but I'm seeing some test regressions on x86_64-linux-gnu that are due to this patch alone:

FAIL: gfortran.dg/default_initialization_3.f90   -O0  execution test

I do not see this error. Can you double check that you indeed use the posted patch:

https://gcc.gnu.org/pipermail/gcc-patches/2021-September/580483.htmland nothing else, e.g., an earlier draft?

Sandra is right.  Actually I do see that regression, too.
The default initialization is missing in F1, see dump-tree:

__attribute__((fn spec (". R w w ")))
integer(kind=4) master.0.f1 (integer(kind=8) __entry, struct t1 * d2, struct t1 * d1)
{
  integer(kind=4) res;
  integer(kind=4) __result_master.0.f1;
  integer(kind=4) res.0 [value-expr: __result_master.0.f1];

  if (d1 != 0B)
    {
      {
        struct t1 t1.1;

        t1.1.i = 7;
        *d1 = t1.1;
      }
    }

The latter "if (d1 != 0B)" block gets removed by your change, and
this is not good.

(I still have to commit it; it was approved by Harald, but he also he preferred to have a second view, I decided to wait until tomorrow/Monday before committing it.)

Well, I did not regtest, only read the patch and trust that you did your
homework!

Tobias

Harald

Reply via email to