This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: Don't use create_tmp_var for static vars
- From: Richard Biener <richard dot guenther at gmail dot com>
- To: Tobias Burnus <tobias dot burnus at physik dot fu-berlin dot de>
- 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>, Bernd Schmidt <bernds at codesourcery dot com>
- Date: Fri, 27 Jun 2014 11:50:40 +0200
- Subject: Re: Don't use create_tmp_var for static vars
- Authentication-results: sourceware.org; auth=none
- References: <20140627085552 dot GA24823 at physik dot fu-berlin dot de>
On Fri, Jun 27, 2014 at 10:55 AM, Tobias Burnus
<tobias.burnus@physik.fu-berlin.de> wrote:
> Bernd Schmidt wrote:
>> I discovered that create_tmp_var is used in the gfortran frontend to
>> create static variables. IMO the function is not intended to do this,
>> and it causes problems for a modification I need to make to it which
>> assumes that it only creates local variables. So I've made a patch
>> to make fortran directly use build_decl instead in these cases.
>>
>> The following was bootstrapped and tested on x86_64-linux. Ok?
>
> I don't know whether create_tmp_var is/was supposed to also handle
> static variables. In any case, the modification looks fine to me.
No, it isn't supposed to be used for non-automatics.
Richard.
> Tobias
>
> PS: I am looking forward to the offloading support, including your PTX
> support.