Hi,

On Sun, 2 Sep 2018, H.J. Lu wrote:

> Here is the patch to replace hard frame pointer with stack pointer
> - UNITS_PER_WORD in x86 backend.
> 
> OK for trunk?
> 
> +// { dg-options "-O -g -fno-omit-frame-pointer -fvar-tracking" }
> +
> +struct Foo
> +{
> +  int bar(int a, int b, int c, int i1, int i2, int i3, int d);
> +};
> +
> +int Foo::bar(int a, int b, int c, int i1, int i2, int i3, int d)
> +{
> +  return 0;
> +}
> diff --git a/gcc/testsuite/g++.dg/pr86593-2.C 
> b/gcc/testsuite/g++.dg/pr86593-2.C
> +// { dg-options "-O -g -fno-omit-frame-pointer -fno-var-tracking" }
> +
> +struct Foo
> +{
> +  int bar(int a, int b, int c, int i1, int i2, int i3, int d);
> +};
> +
> +int Foo::bar(int a, int b, int c, int i1, int i2, int i3, int d)
> +{
> +  return 0;
> +}

I can't seem to reproduce any ICEs with trunk on the above two testcases 
(configured for x86_64-linux):

% ./gcc/cc1plus -quiet -O -g -fno-omit-frame-pointer -fno-var-tracking x.cc
% ./gcc/cc1plus -quiet -O -g -fno-omit-frame-pointer -fvar-tracking x.cc

I get the feeling this needs to be fixed somewhere else, namely 
eliminate_regs.  Basically if the frame pointer isn't needed, then why is 
hard_frame_pointer_rtx even somewhere in the final RTL?  The elimination 
you do explicitely in your new routines should have been done as part of 
general register elimination.  Why isn't it?


Ciao,
Michael.

Reply via email to