This is the mail archive of the fortran@gcc.gnu.org mailing list for the GNU Fortran project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [PATCH] Emit DECL_EXPR so that type of what pstr.N points to is gimplified (PR fortran/78757)


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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]