This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC 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: PR tree-optimization/47190: ICE on weakref missing alias info


On Mon, 24 Jan 2011, Jan Hubicka wrote:

> > On Sat, 22 Jan 2011, Jan Hubicka wrote:
> > 
> > > Hi,
> > > this PR shows ICE on invalid
> > > static int i __attribute__ ((weakref));
> > > 
> > > according to docs, weakref attribute should be accompanied with an alias.
> > > This patch adds checking into cgraphunit.c.
> > > 
> > > Bootstrapped/regtested x86_64-linux, OK?
> > 
> > It's bad this is not possible in c-common when building the
> > weakref attribute.  Can't we simply ignore weakref without
> > alias?  That would be a tiny bit cleaner than verifying
> > attributes from cgraph ...
> Docs explicitly shows the testcase:
> static int x() __attribute__ ((weakref));
> static int x() __attribute__ ((alias ("y")));
> 
> I think whatever we do during parsing would refuse the first declaration.
> 
> Since we do this attribute finalization there anyway, I don't think it is that bad.

Any reason we can't ignore non-aliased weakrefs at uses?

Richard.


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