Re: [PATCH] Diagnose pr54694

2014-01-16 Thread Richard Henderson
On 01/16/2014 10:21 AM, Jakub Jelinek wrote: > So like this? Tested on x86_64 with > make -k check-gcc RUNTESTFLAGS='--target_board=unix\{-m32,-m64\} > i386.exp=pr9771-1.c' > > 2014-01-16 Jakub Jelinek > > PR debug/54694 > * gcc.target/i386/pr9771-1.c (main): Rename to... >

Re: [PATCH] Diagnose pr54694

2014-01-16 Thread Jakub Jelinek
On Thu, Jan 16, 2014 at 09:51:24AM -0800, Richard Henderson wrote: > On 01/16/2014 09:35 AM, Jakub Jelinek wrote: > > Wonder if the test should be turned into dg-do compile, > > or perhaps a hack like: > > int xmain() __asm__ ("main"); > > int xmain() > > instead of > > int main() > > to avoid the

Re: [PATCH] Diagnose pr54694

2014-01-16 Thread Richard Henderson
On 01/16/2014 09:35 AM, Jakub Jelinek wrote: > Wonder if the test should be turned into dg-do compile, > or perhaps a hack like: > int xmain() __asm__ ("main"); > int xmain() > instead of > int main() > to avoid the dynamic stack realigning in main (limit the test to *linux* > then?), supply main w

Re: [PATCH] Diagnose pr54694

2014-01-16 Thread Jakub Jelinek
On Thu, Jan 16, 2014 at 09:40:33AM -0800, H.J. Lu wrote: > On Thu, Jan 16, 2014 at 9:35 AM, Jakub Jelinek wrote: > > On Thu, Jan 16, 2014 at 08:06:07AM -0800, Richard Henderson wrote: > >> On 01/15/2014 01:58 PM, Jakub Jelinek wrote: > >> > On Wed, Jan 15, 2014 at 01:43:18PM -0800, Richard Henders

Re: [PATCH] Diagnose pr54694

2014-01-16 Thread H.J. Lu
On Thu, Jan 16, 2014 at 9:35 AM, Jakub Jelinek wrote: > On Thu, Jan 16, 2014 at 08:06:07AM -0800, Richard Henderson wrote: >> On 01/15/2014 01:58 PM, Jakub Jelinek wrote: >> > On Wed, Jan 15, 2014 at 01:43:18PM -0800, Richard Henderson wrote: >> >> --- /dev/null >> >> +++ b/gcc/testsuite/gcc.targe

Re: [PATCH] Diagnose pr54694

2014-01-16 Thread Jakub Jelinek
On Thu, Jan 16, 2014 at 08:06:07AM -0800, Richard Henderson wrote: > On 01/15/2014 01:58 PM, Jakub Jelinek wrote: > > On Wed, Jan 15, 2014 at 01:43:18PM -0800, Richard Henderson wrote: > >> --- /dev/null > >> +++ b/gcc/testsuite/gcc.target/i386/pr54694.c > >> @@ -0,0 +1,11 @@ > >> +/* { dg-do compi

Re: [PATCH] Diagnose pr54694

2014-01-16 Thread Richard Henderson
On 01/15/2014 01:58 PM, Jakub Jelinek wrote: > On Wed, Jan 15, 2014 at 01:43:18PM -0800, Richard Henderson wrote: >> --- /dev/null >> +++ b/gcc/testsuite/gcc.target/i386/pr54694.c >> @@ -0,0 +1,11 @@ >> +/* { dg-do compile } */ >> +/* { dg-options "-O" } */ >> + >> +register void *hfp __asm__("%ebp

Re: [PATCH] Diagnose pr54694

2014-01-15 Thread Marek Polacek
On Wed, Jan 15, 2014 at 01:43:18PM -0800, Richard Henderson wrote: > On 01/15/2014 08:37 AM, H.J. Lu wrote: > > We should add a testcase to verify this. > > > > I included the following testcase with the commit. I couldn't find a way > to test this properly generically, so I just went with the o

Re: [PATCH] Diagnose pr54694

2014-01-15 Thread Jakub Jelinek
On Wed, Jan 15, 2014 at 01:43:18PM -0800, Richard Henderson wrote: > --- /dev/null > +++ b/gcc/testsuite/gcc.target/i386/pr54694.c > @@ -0,0 +1,11 @@ > +/* { dg-do compile } */ > +/* { dg-options "-O" } */ > + > +register void *hfp __asm__("%ebp"); /* { dg-message "note: for" } */ Shouldn't that

Re: [PATCH] Diagnose pr54694

2014-01-15 Thread Richard Henderson
On 01/15/2014 08:37 AM, H.J. Lu wrote: > We should add a testcase to verify this. > I included the following testcase with the commit. I couldn't find a way to test this properly generically, so I just went with the obvious i386 test. r~ diff --git a/gcc/ChangeLog b/gcc/ChangeLog index c93bf23

Re: [PATCH] Diagnose pr54694

2014-01-15 Thread Richard Henderson
On 01/15/2014 08:28 AM, Jakub Jelinek wrote: >> -static tree GTY(()) global_regs_decl[FIRST_PSEUDO_REGISTER]; >> > +tree GTY(()) global_regs_decl[FIRST_PSEUDO_REGISTER]; > Do you need the GTY(()) marker here when there is GTY(()) already in the > header? > Otherwise looks good to me. > Fixed befo

Re: [PATCH] Diagnose pr54694

2014-01-15 Thread H.J. Lu
On Wed, Jan 15, 2014 at 8:23 AM, Richard Henderson wrote: > IMO the test case is invalid, but as always an ICE is unacceptable. > > I can imagine there are some legitimate uses for absconding with > the hard frame pointer, under -fomit-frame-pointer plus knowledge > that the code is simple enough.

Re: [PATCH] Diagnose pr54694

2014-01-15 Thread Jakub Jelinek
On Wed, Jan 15, 2014 at 08:23:45AM -0800, Richard Henderson wrote: > --- a/gcc/reginfo.c > +++ b/gcc/reginfo.c > @@ -86,7 +86,7 @@ static const char initial_call_really_used_regs[] = > CALL_REALLY_USED_REGISTERS; > char global_regs[FIRST_PSEUDO_REGISTER]; > > /* Declaration for the global regi