------- Comment #23 from rguenther at suse dot de 2010-09-15 13:56 ------- Subject: Re: [4.5/4.6 Regression] GCC 4.5.[01] breaks our ffi on Linux64. ABI break?
On Wed, 15 Sep 2010, mh+gcc at glandium dot org wrote: > ------- Comment #22 from mh+gcc at glandium dot org 2010-09-15 13:52 ------- > (In reply to comment #21) > > For the original code? Then your reduced testcase is different from the > > original problem. > > It doesn't work for the reduced testcase here, with gcc 4.5.1 It does fix the PTA problem (thus makes it work at -O1). Still fails at -O2 for some reason (but can't reproduce that on the tip of the branch, only with the 4.5.1 release). Alias-correct testcase: #include <stdint.h> extern void abort (void); char *s1 = "foo"; char *s2 = "bar"; char **ss1 = &s1; typedef union jsval_layout { uint64_t asBits; char **ptr; } jsval_layout; int main() { jsval_layout l, m; l.ptr = ss1; m.asBits = l.asBits; char ** data = m.ptr; *data = s2; if (s1 != s2) abort (); return 0; } -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=45623