http://gcc.gnu.org/bugzilla/show_bug.cgi?id=49379
Summary: warning from Mac OS X linker alignment lost for
-ftree-vectorize optimization
Product: gcc
Version: 4.7.0
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: c
AssignedTo: [email protected]
ReportedBy: [email protected]
While running some tests on Mac OS X 10.6.7 I ran into
the following warning from the linker:
ld: warning: alignment lost in merging tentative definition _u_th_arr
Test links without the warning if -fno-tree-vectorize option is
provided when compiling the source.
I didn't have a chance to verify that executable is correct as
my test is hanging - there might be multiple reasons for it.
Linker is:
@(#)PROGRAM:ld PROJECT:ld64-123.2
llvm version 2.9svn, from Apple Clang 2.0 (build 139)
I am attaching a small test program that I checked out against
the snapshot of the compiler 4.7.0 20110604. Here is the output
of the compile/link process:
+ snapshot/gcc/xgcc -B../bld/packed-opt/gcc/ -v
Reading specs from ../bld/packed-opt/gcc/specs
COLLECT_GCC=snapshot/gcc/xgcc
COLLECT_LTO_WRAPPER=../bld/packed-opt/gcc/lto-wrapper
Target: x86_64-apple-darwin10.7.4
Configured with: ../../src/gcc-4.7-20110604/configure --disable-bootstrap
Thread model: posix
gcc version 4.7.0 20110604 (experimental) (GCC)
+ snapshot/gcc/xgcc -B../bld/packed-opt/gcc/ -I. -O3 -c a.c
+ snapshot/gcc/xgcc -B../bld/packed-opt/gcc/ -I. -O3 -c b.c
+ snapshot/gcc/xgcc -B../bld/packed-opt/gcc/ -o a -O3 a.o b.o
ld: warning: alignment lost in merging tentative definition _u_th_arr
+ snapshot/gcc/xgcc -B../bld/packed-opt/gcc/ -I. -O3 -fno-tree-vectorize -c a.c
+ snapshot/gcc/xgcc -B../bld/packed-opt/gcc/ -I. -O3 -fno-tree-vectorize -c b.c
+ snapshot/gcc/xgcc -B../bld/packed-opt/gcc/ -o a -O3 a.o b.o