Richard Guenther writes: > On Tue, Mar 8, 2011 at 10:43 AM, Mikael Pettersson <mi...@it.uu.se> wrote: > > gcc.dg/tree-ssa/ssa-ccp-33.c fails with gcc trunk on m68k-linux: > > > > ssa-ccp-33.c:(.text+0x2a): undefined reference to `link_error' > > ssa-ccp-33.c:(.text+0x2a): undefined reference to `link_error' > > FAIL: gcc.dg/tree-ssa/ssa-ccp-33.c (test for excess errors) > > ssa-ccp-33.c:(.text+0x2a): undefined reference to `link_error' > > > > The test case checks that the compiler is able to eliminate a > > runtime check that an aligned pointer-to-int remains aligned after > > a loop of increments. It uses sizeof to compute the alignment > > of int, but on m68k (and possibly others) the alignment of int > > is less than its size. The compiler is then unable to eliminate > > the broken alignment check, and the call to link_error () is not > > removed. > > > > Fixed by using __alignof__ instead. Regression tested on m68k-linux > > where it eliminated the FAIL for gcc.dg/tree-ssa/ssa-ccp-33.c. > > Also tested on i686-linux, no changes there. > > > > Ok for trunk? > > > > (Richard G. pre-approved this change on the PR entry, however I > > cannot commit it myself.) > > Committed. > Richard.
Thanks!