https://gcc.gnu.org/bugzilla/show_bug.cgi?id=103427

--- Comment #9 from rguenther at suse dot de <rguenther at suse dot de> ---
On Thu, 25 Nov 2021, jakub at gcc dot gnu.org wrote:

> https://gcc.gnu.org/bugzilla/show_bug.cgi?id=103427
> 
> --- Comment #8 from Jakub Jelinek <jakub at gcc dot gnu.org> ---
> (In reply to Richard Biener from comment #6)
> > Is the case important enough to worry about?  Actual accesses will be
> > assumed to be aligned according to the type.
> > 
> > But sure, we could in theory special-case REFERENCE_TYPE in CCP.  Does any
> > other frontend use REFERENCE_TYPE?
> 
> Fortran and Ada do.
> For Fortran it is used for dummy arguments passed by reference (most of them),
> but whether that implies the reference must be well aligned or not, I don't
> know.
> For Ada no idea.
> Also, "this" in methods doesn't have a reference type, even though it actually
> works more like a reference than pointer.

I suppose it's better to have a flag on a PARM_DECL then indicating
the pointed to storage is aligned according to its type.  Can one
have sth like int *& or int && (pointer to reference or reference to
reference?)

Reply via email to