On Tue, Jul 14, 2015 at 1:58 PM, Vladimir Makarov <[email protected]> wrote:
> The following patch fixes
>
> https://gcc.gnu.org/bugzilla/show_bug.cgi?id=66626
>
> The patch was bootstrapped and tested on x86/x86-64.
>
> Committed as rev. 225789.
>
> 2015-07-14 Vladimir Makarov <[email protected]>
>
> PR rtl-optimization/66626
> * lra-constraints.c (lra_constraints): Prevent equivalence
> substitution for static chain pseudo in functions with nonlocal
> goto.
>
> 2015-07-14 Vladimir Makarov <[email protected]>
>
> PR rtl-optimization/66626
> * gcc.target/i386/pr66626.c: New.
>
This testcase still fails:
[hjl@gnu-6 pr66626]$ cat x.i
extern void abort (void);
int s (int i)
{
__label__ l1;
int foo (int i)
{
if (i == 2)
goto l1;
return 0;
}
return foo (i);
l1:;
return 1;
}
int main ()
{
if (s (2) != 1)
abort ();
return 0;
}
[hjl@gnu-6 pr66626]$ /export/build/gnu/gcc/build-x86_64-linux/gcc/xgcc
-B/export/build/gnu/gcc/build-x86_64-linux/gcc/ -O2 -m32 -mregparm=3
-o x x.i
[hjl@gnu-6 pr66626]$ ./x
Segmentation fault
[hjl@gnu-6 pr66626]$
--
H.J.