From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 12698 invoked by alias); 3 Apr 2009 12:01:59 -0000 Received: (qmail 10446 invoked by uid 48); 3 Apr 2009 12:01:47 -0000 Date: Fri, 03 Apr 2009 12:01:00 -0000 Message-ID: <20090403120147.10445.qmail@sourceware.org> X-Bugzilla-Reason: CC References: Subject: [Bug other/39573] linking fails when optimizations are enabled In-Reply-To: Reply-To: gcc-bugzilla@gcc.gnu.org To: gcc-bugs@gcc.gnu.org From: "fpbeekhof at gmail dot com" Mailing-List: contact gcc-bugs-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Archive: List-Post: List-Help: Sender: gcc-bugs-owner@gcc.gnu.org X-SW-Source: 2009-04/txt/msg00193.txt.bz2 ------- Comment #1 from fpbeekhof at gmail dot com 2009-04-03 12:01 ------- I've tried compiling the same code on several machines. Outcome: intel machines are fine, AMD machines exhibit this behaviour. The second AMD machine has ubuntu 8.04 on it, and a different compiler version: $ gcc -v Using built-in specs. Target: x86_64-linux-gnu Configured with: ../src/configure -v --enable-languages=c,c++,fortran,objc,obj-c++,treelang --prefix=/usr --enable-shared --with-system-zlib --libexecdir=/usr/lib --without-included-gettext --enable-threads=posix --enable-nls --with-gxx-include-dir=/usr/include/c++/4.2 --program-suffix=-4.2 --enable-clocale=gnu --enable-libstdcxx-debug --enable-objc-gc --enable-mpfr --enable-checking=release --build=x86_64-linux-gnu --host=x86_64-linux-gnu --target=x86_64-linux-gnu Thread model: posix gcc version 4.2.4 (Ubuntu 4.2.4-1ubuntu3) Still, the result is the same: $ make CNF=gcc scons -j 2 CNF=gcc MODE= BACKEND= CVMLCPP_PREFIX=/user/l1/beekhof/ scons: Reading SConscript files ... scons: done reading SConscript files. scons: Building targets ... g++ -o main.o -c -pipe -I. -Wall -O3 -funroll-loops -fopenmp -march=native -ftree-vectorize -DNDEBUG -I/user/l1/beekhof//include/ main.cpp g++ -o tinystr.o -c -pipe -I. -Wall -O3 -funroll-loops -fopenmp -march=native -ftree-vectorize -DNDEBUG -I/user/l1/beekhof//include/ tinystr.cpp g++ -o tinyxml.o -c -pipe -I. -Wall -O3 -funroll-loops -fopenmp -march=native -ftree-vectorize -DNDEBUG -I/user/l1/beekhof//include/ tinyxml.cpp g++ -o tinyxmlerror.o -c -pipe -I. -Wall -O3 -funroll-loops -fopenmp -march=native -ftree-vectorize -DNDEBUG -I/user/l1/beekhof//include/ tinyxmlerror.cpp g++ -o tinyxmlparser.o -c -pipe -I. -Wall -O3 -funroll-loops -fopenmp -march=native -ftree-vectorize -DNDEBUG -I/user/l1/beekhof//include/ tinyxmlparser.cpp g++ -o shapes -fopenmp -L/user/l1/beekhof//lib/ tinystr.o tinyxml.o tinyxmlerror.o tinyxmlparser.o main.o -lcvmlcpp -lz -lboost_iostreams main.o: In function `_ZN7cvmlcpp25extractSurfaceFromAdapterIN6shapes20ShapeSurfaceAdaptor_IdEEdEEvRKT_RNS_8GeometryIT0_EEd.omp_fn.9': main.cpp:(.text+0x2af2): undefined reference to `_ZN7cvmlcpp25extractSurfaceFromAdapterIN6shapes20ShapeSurfaceAdaptor_IdEEdEEvRKT_RNS_8GeometryIT0_EEd.omp_fn.9::C.497' collect2: ld returned 1 exit status scons: *** [shapes] Error 1 scons: building terminated because of errors. make: *** [compile] Error 2 I'll see if I can make a reduced test-case... -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=39573