diff mbox

[fortran] PR 37131, inline matmul

Message ID 55A6D2A7.1020401@sfr.fr
State New
Headers show

Commit Message

Mikael Morin July 15, 2015, 9:37 p.m. UTC
Le 15/07/2015 16:03, Thomas Schwinge a écrit :
> Hi!
> 
> On Wed, 15 Jul 2015 13:44:38 +0200, Mikael Morin <mikael.morin@sfr.fr> wrote:
>> Le 13/07/2015 21:54, Thomas Schwinge a écrit :
>>> Original situation; _gfortran_runtime_error is not being properly
>>> declared (invoked via gcc/fortran/frontend-passes.c:runtime_error_ne),
>>> but, for example, _gfortran_error_runtime_at is being properly declared
>>> (invoked from elsewhere):
>>
>> normal (non-frontend-generated) code does through a 'resolution' step
>> which after some checks may resolve procedure names to intrinsic
>> procedure symbols (user procedure with same name as an intrinsic are
>> allowed).
>> So maybe what you miss is such a resolution step.
>> Does it work if you add
>>   resolve_block_construct (*c);
>> at the end of inline_matmul_assign?
> 
> Hmm, that doesn't seem to work, or I've done it wrongly.  Any other
> ideas?
> 
I tried the following, but it doesn't seem to work either.  At least I
get the same grep output as before.
I'm running out of imagination.

Mikael

   if_2->op = EXEC_IF;
diff mbox

Patch

diff --git a/gcc/fortran/frontend-passes.c b/gcc/fortran/frontend-passes.c
index 3eda42f..0c5c65f 100644
--- a/gcc/fortran/frontend-passes.c
+++ b/gcc/fortran/frontend-passes.c
@@ -2160,6 +2160,7 @@  runtime_error_ne (gfc_expr *e1, gfc_expr *e2,
const char *msg)

   gfc_check_fe_runtime_error (c->ext.actual);
   gfc_resolve_fe_runtime_error (c);
+  c->resolved_isym = gfc_intrinsic_subroutine_by_id
+				(GFC_ISYM_FE_RUNTIME_ERROR);

   if_2 = XCNEW (gfc_code);