This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: Initial shrink-wrapping patch
- From: Ian Lance Taylor <iant at google dot com>
- To: Bernd Schmidt <bernds at codesourcery dot com>
- Cc: Richard Henderson <rth at redhat dot com>, Richard Guenther <richard dot guenther at gmail dot com>, GCC Patches <gcc-patches at gcc dot gnu dot org>, richard dot sandiford at linaro dot org
- Date: Wed, 5 Oct 2011 16:04:36 -0700
- Subject: Re: Initial shrink-wrapping patch
- References: <4E5E7342.9050103@codesourcery.com> <g462lcbc22.fsf@richards-thinkpad.stglab.manchester.uk.ibm.com> <4E6E9857.50600@t-online.de> <g4ehzklu0r.fsf@richards-thinkpad.stglab.manchester.uk.ibm.com> <4E6F37D9.9000108@t-online.de> <g4pqj4k702.fsf@richards-thinkpad.stglab.manchester.uk.ibm.com> <4E6F4B90.2050408@codesourcery.com> <g4hb4gk2xa.fsf@richards-thinkpad.stglab.manchester.uk.ibm.com> <4E6F786E.6080407@codesourcery.com> <4E712FD6.5030109@redhat.com> <4E8239ED.9020004@codesourcery.com> <4E85F395.3030006@redhat.com> <4E8B8469.2090605@codesourcery.com> <4E8B88E7.3090107@redhat.com> <CAFiYyc2VePBTofTZ+N6Ck_fpzgXdz7N8zncbtgX2OGnW87_7uA@mail.gmail.com> <4E8C7ED0.3090705@codesourcery.com> <4E8C83FA.3000607@redhat.com> <4E8C912C.2060805@codesourcery.com>
On Wed, Oct 5, 2011 at 10:17 AM, Bernd Schmidt <bernds@codesourcery.com> wrote:
>
> I've committed the following after a x86_64-linux bootstrap.
This patch appears to have broken the Go bootstrap when compiling a C
file in libgo. ?Here is a reduced test case:
static struct
{
int n;
unsigned int m;
_Bool f;
} g;
_Bool
f (int s)
{
unsigned int b, m;
if (!g.f)
return 0;
b = 1 << s;
while (1)
{
m = g.m;
if (m & b)
break;
if (__sync_bool_compare_and_swap (&g.m, m, m|b))
{
if (m == 0)
f2 (&g.n);
break;
}
}
return 1;
}
Compiling this file with -O2 -fsplit-stack causes an ICE:
foo.c:29:1: internal compiler error: in maybe_record_trace_start, at
dwarf2cfi.c:2243
Compiling the file with -O2 -fsplit-stack -fno-shrink-wrap works.
Ian