This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: (g)fortran support for MPX (was: Re: [PATCH, MPX, 2/X] Pointers Checker [8/25] Languages support)
- From: Ilya Enkovich <enkovich dot gnu at gmail dot com>
- To: Tobias Burnus <burnus at net-b dot de>
- Cc: Richard Biener <richard dot guenther at gmail dot com>, GCC Patches <gcc-patches at gcc dot gnu dot org>, gfortran <fortran at gcc dot gnu dot org>
- Date: Tue, 19 Nov 2013 00:37:32 +0400
- Subject: Re: (g)fortran support for MPX (was: Re: [PATCH, MPX, 2/X] Pointers Checker [8/25] Languages support)
- Authentication-results: sourceware.org; auth=none
- References: <20131031091116 dot GD54327 at msticlxl57 dot ims dot intel dot com> <CAFiYyc3kcBnrjfZMNLL9d=obJZg9giu+47iBB13Vr=px+K=WKA at mail dot gmail dot com> <CAMbmDYa265-Jbk2Uq3-7uKu+mAHrHagQ4iRRRnt7ip6ejhx6eg at mail dot gmail dot com> <CAFiYyc0-TcYs0MjpmyR0Cho+3OG1WdX9xDNnm9KuXioQ1jk2=w at mail dot gmail dot com> <CAMbmDYaOzYjcud8L3fvsj94mWpvNrFTQGHR=p5akvFPrD-NYDA at mail dot gmail dot com> <CAFiYyc2xd7wynB9JRPF3KWY6EhXg-=KUg=g5BTxOjzO1pF3ovQ at mail dot gmail dot com> <CAMbmDYZSpcnCxufY59_QCL_Zp8-=+fQEZvi_tJCDKE=M=Hwqfg at mail dot gmail dot com> <CAFiYyc0RGepPUTU36HCvLrFFM_Y1eGae9kuAV8tn=MZnTRLwzA at mail dot gmail dot com> <CAMbmDYaL=q4D5qfXENhaH5OjdsMznwiyWURWLDw+8unyxP-0oQ at mail dot gmail dot com> <CAFiYyc2owq4pow_h0uep6vw9wUoay5CrLVEVpAuq0yQSmgiW7w at mail dot gmail dot com> <CAMbmDYbm5=Z-MpeSWuu9+K=fUfcPUjzNfHWWVGVAGNW=UB=O9Q at mail dot gmail dot com> <528A6F4E dot 8000704 at net-b dot de>
2013/11/18 Tobias Burnus <burnus@net-b.de>:
> Ilya Enkovich wrote:
>>
>> The issue is that users do not get what expect. I do not want someone
>> having mixed codes get instrumentation for his Java/Fortran/Ada
>> functions which slows them down and does nothing useful. What is the
>> point to allow checks of pointer bounds for language with no pointers?
>
>
> Talking about Fortran, I wonder which modifications are required to get it
> working. Can you give some pointers? I lost a bit track.
>
> (For readers, who haven't followed: See
> http://gcc.gnu.org/wiki/Intel_MPX_support_in_the_GCC_compiler )
>
> In Fortran, often an array is described by an array descriptor, a struct
> which carries both the pointer address and the array bounds. Thus, that
> makes it simpler to check for bound violations at runtime (existing
> -fcheck=bounds). However, arrays can also be passed as in a way that only
> the address is known – in that case, one has the same issues as with C. One
> place where the issue occurs is interoperating with C, but also within
> Fortran it can occur. I think especially for interoperability with C (C++
> with extern "c", etc.), having the checks would be useful.
>
> I have to admit that it is not completely clear to me when to best add MPX
> annotations with Fortran, but as it is explicitly controlled by a
> compile-time flag, there is no real reason for not using it.
Unfortunately I have only basic Fortran knowledge and cannot fully
estimate what may be required for its enabling. From stability point
of view there should not be significant problem. Instrumentation
itself should work OK, but most probably you would get more
instrumentation than you want. E.g. if you have array bounds placed
near array pointer, you do not need to use expensive Bounds Tables. If
you want only some particular type of pointers to be instrumented then
you need to add such feature. Also some language features may be
required (e.g. for C new attributes were added to mark arrays with
variable size and functions not requiring instrumentation).
Ilya
>
> Tobias
- References:
- Re: [PATCH, MPX, 2/X] Pointers Checker [8/25] Languages support
- Re: [PATCH, MPX, 2/X] Pointers Checker [8/25] Languages support
- Re: [PATCH, MPX, 2/X] Pointers Checker [8/25] Languages support
- Re: [PATCH, MPX, 2/X] Pointers Checker [8/25] Languages support
- Re: [PATCH, MPX, 2/X] Pointers Checker [8/25] Languages support
- Re: [PATCH, MPX, 2/X] Pointers Checker [8/25] Languages support
- Re: [PATCH, MPX, 2/X] Pointers Checker [8/25] Languages support
- Re: [PATCH, MPX, 2/X] Pointers Checker [8/25] Languages support
- Re: [PATCH, MPX, 2/X] Pointers Checker [8/25] Languages support
- Re: [PATCH, MPX, 2/X] Pointers Checker [8/25] Languages support
- (g)fortran support for MPX (was: Re: [PATCH, MPX, 2/X] Pointers Checker [8/25] Languages support)