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: Fix PR20204


On Fri, Feb 25, 2005 at 02:35:26PM -0500, Jakub Jelinek wrote:
> On Fri, Feb 25, 2005 at 02:27:07PM -0500, Andrew Pinski wrote:
> > >The trick with the __asm__ annotations is that they force the 
> > >optimizers to treat all those variables as virtuals, tickling the bug. 
> > > This test works on x86 with the fix and fails without it.
> > 
> > How can it run on x86, when there is no register r12/r11?
> > I just tried on x86, not x86_32:
> > int main()
> > {
> >   register void *return_dst __asm__ ("r13");
> >   return *(int*)(return_dst);
> > }
> > 
> > And I get an ICE (which is a regression by the way).
> 
> If we don't issue errors on the original testcase on i386, it is surely
> a bug.  I think it would be better if the test was tested on some popular
> architectures (at least i386, x86-64, ppc* and on the originally reported
> one (== cris)), but I think you need some #ifdefs to choose register names
> depending on #ifdef __i386__ ... #elif defined __x86_64 ...

We've got a couple copies of that already.  There should probably be a
common header in the testsuite...

-- 
Daniel Jacobowitz
CodeSourcery, LLC


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