This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [Patch, fortran] PR 37131, inline matmul
- From: Mikael Morin <mikael dot morin at sfr dot fr>
- To: Thomas Schwinge <thomas at codesourcery dot com>, Thomas Koenig <tkoenig at netcologne dot de>, Bernd Schmidt <bernds at codesourcery dot com>
- Cc: gcc-patches <gcc-patches at gcc dot gnu dot org>, "fortran at gcc dot gnu dot org" <fortran at gcc dot gnu dot org>
- Date: Wed, 15 Jul 2015 23:37:43 +0200
- Subject: Re: [Patch, fortran] PR 37131, inline matmul
- Authentication-results: sourceware.org; auth=none
- Authentication-results: sfrmc.priv.atos.fr; dkim=none (no signature); dkim-adsp=none (no policy) header dot from=mikael dot morin at sfr dot fr
- References: <55486270 dot 8010909 at netcologne dot de> <5548BE61 dot 1090506 at sfr dot fr> <554A78F7 dot 5010300 at netcologne dot de> <87vbdnzvd4 dot fsf at kepler dot schwinge dot homeip dot net> <55A647A6 dot 5010409 at sfr dot fr> <87d1zt34cx dot fsf at schwinge dot name>
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
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);
if_2->op = EXEC_IF;