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: [PATCH] Remove broken testcase gcc.c-torture/execute/20020619-1.c


On Wed, 11 Jun 2008, Ian Lance Taylor wrote:

> Richard Guenther <rguenther@suse.de> writes:
> 
> > Maybe I'm missing something obvious, but the testcase
> > gcc.c-torture/execute/20020619-1.c invokes undefined behavior in
> > test(), as *(int *)c references c through an incompatible lvalue.
> >
> > In particular 6.5/7 doesn't make the object type special, but only
> > the lvalue type.  And the effective type of c is char (its declared
> > type).  And clearly char and int are not compatible either.
> >
> > But well...  ok for mainline?  (this is the single testcase that
> > "breaks" if we fix PR36345, the TBAA-pruning of points-to sets)
> 
> For what it's worth, that test case was added here, without a
> ChangeLog entry:
> 
> http://gcc.gnu.org/ml/gcc-patches/2002-06/msg01730.html
> 
> Interestingly, the invalid part of the test is not what Richard
> Henderson was actually trying to test.  He was fixing a bug which
> caused ref to return the wrong value, and wrote test to try to get the
> endian-independent value which ref was supposed to return.
> 
> It would probably suffice to change main to check that ref returns
> either 0x01020304 or 0x04030201.

Ok, I'll make an adjustment according to that.

Thanks,
Richard.


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