https://gcc.gnu.org/bugzilla/show_bug.cgi?id=84386

--- Comment #7 from Harald Anlauf <anlauf at gcc dot gnu.org> ---
Created attachment 65005
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=65005&action=edit
WIP patch

This patch is based on a hint by Jerry off-list, which still lead to some
(but less) fallout.  I found a way to cut down on it further.

This fixes the testcases in this PR, and the testsuite produces:

XPASS: gfortran.dg/block_6.f08   -O2  execution test
FAIL: gfortran.dg/func_decl_3.f90   -O   (test for errors, line 12)
FAIL: gfortran.dg/host_assoc_function_9.f90   -O2  (test for excess errors)
FAIL: gfortran.dg/pr103715.f90   -O  (test for excess errors)
FAIL: gfortran.dg/pr88376.f90   -O   (test for errors, line 6)
FAIL: gfortran.dg/goacc/pr94120-2.f90   -O   (test for errors, line 10)

The XPASS is directly related to this PR. :-)

The others are namespace or resolution confusions and need to get hunted down.

Reply via email to