This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug testsuite/47954] New: gcc.dg/tree-ssa/ssa-ccp-33.c fails with link error on m68k-linux
- From: "mikpe at it dot uu.se" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Wed, 2 Mar 2011 13:36:08 +0000
- Subject: [Bug testsuite/47954] New: gcc.dg/tree-ssa/ssa-ccp-33.c fails with link error on m68k-linux
- Auto-submitted: auto-generated
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: unassigned@gcc.gnu.org
ReportedBy: mikpe@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.