http://gcc.gnu.org/bugzilla/show_bug.cgi?id=47954

           Summary: gcc.dg/tree-ssa/ssa-ccp-33.c fails with link error on
                    m68k-linux
           Product: gcc
           Version: 4.6.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: testsuite
        AssignedTo: unassig...@gcc.gnu.org
        ReportedBy: mi...@it.uu.se


On m68k-linux the gcc.dg/tree-ssa/ssa-ccp-33.c test case fails:

> fgrep ssa-ccp-33 gcc/testsuite/gcc/gcc.log
Executing on host: /mnt/scratch/objdir46/gcc/xgcc -B/mnt/scratch/objdir46/gcc/
/mnt/scratch/gcc-4.6-20110226/gcc/testsuite/gcc.dg/tree-ssa/ssa-ccp-33.c   -O 
-lm   -o ssa-ccp-33.exe    (timeout = 300)
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 uses "sizeof(int)-1" to generate a mask of bits that must be zero
in an "int *p", and calls link_error() if this isn't the case, the intention
being that the compiler completely eliminates the call.

However, on m68k-linux __alignof__(int) == 2 while sizeof(int) == 4, so the
compiler fails to optimize the check away, leading to the link error.

The test case should use __alignof__ not sizeof.

Reply via email to