This is the mail archive of the
fortran@gcc.gnu.org
mailing list for the GNU Fortran project.
Re: [PATCH] Emit DECL_EXPR so that type of what pstr.N points to is gimplified (PR fortran/78757)
- From: Jakub Jelinek <jakub at redhat dot com>
- To: Andre Vehreschild <vehre at gmx dot de>
- Cc: fortran at gcc dot gnu dot org, Richard Biener <rguenther at suse dot de>, gcc-patches at gcc dot gnu dot org
- Date: Fri, 16 Dec 2016 16:54:45 +0100
- Subject: Re: [PATCH] Emit DECL_EXPR so that type of what pstr.N points to is gimplified (PR fortran/78757)
- Authentication-results: sourceware.org; auth=none
- References: <20161214215529.GC2038@tucnak> <20161216164912.7bef3ebe@vepi2>
- Reply-to: Jakub Jelinek <jakub at redhat dot com>
On Fri, Dec 16, 2016 at 04:49:12PM +0100, Andre Vehreschild wrote:
> the patch looks ok to me. I am wondering whether we should setup a routine
> or a macro for doing such a DECL_EXPR like Fortran needs it. In your case the
> TYPE_DECL is marked artificial and ignored in other cases not. Would that be
> need also at the six other locations gfortran uses a type decl?
I think it depends. If the TYPE_DECL is added as TYPE_NAME of the type,
then the DECL_ARTIFICIAL and DECL_IGNORED_P on it should depend on what kind
of type it is, if it is a user type, it shouldn't be artificial.
While in this case it isn't added as TYPE_NAME of the type, it is just a
mean to tell the gimplifier to gimplify the type, so it shouldn't make it
in that case into debug info etc.
Maybe it would be better not to use a pointer to VLA type here at all,
just pointer to void, and then after the call convert it to the right lhs
type. I haven't analyzed all the possible cases though to find out if it
could work.
Jakub