From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 4840 invoked by alias); 24 Mar 2008 16:48:36 -0000 Received: (qmail 4540 invoked by uid 48); 24 Mar 2008 16:47:52 -0000 Date: Mon, 24 Mar 2008 16:48:00 -0000 Message-ID: <20080324164752.4539.qmail@sourceware.org> X-Bugzilla-Reason: CC References: Subject: [Bug target/35659] Miscompiled code with -O2 (but not with -O2 -funroll-loops) on ia64 In-Reply-To: Reply-To: gcc-bugzilla@gcc.gnu.org To: gcc-bugs@gcc.gnu.org From: "kmccarty at debian dot org" 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: 2008-03/txt/msg01912.txt.bz2 ------- Comment #2 from kmccarty at debian dot org 2008-03-24 16:47 ------- (In reply to comment #1) > Does it work with gcc 4.2? Yes, it does, at least with this version: (sid)kmccarty@merulo:~$ gfortran-4.2 -v Using built-in specs. Target: ia64-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 --disable-libmudflap --disable-libssp --with-system-libunwind --enable-checking=release --build=ia64-linux-gnu --host=ia64-linux-gnu --target=ia64-linux-gnu Thread model: posix gcc version 4.2.3 (Debian 4.2.3-2) The test case works in all cases with gfortran 4.2, regardless of whether I use libkernlib.a and libkerngent.a compiled with gfortran 4.2 or 4.3. (But please let me know if you need copies of these libraries built with gfortran 4.2 anyway.) I also just noticed, surprisingly, that with gfortran 4.3, if I compile the test program with -O3 or with -O3 -funroll-loops, the test succeeds. So oddly enough it is ONLY with -O2 (without -funroll-loops) that the test fails. (Again, this behavior is independent of which gfortran version I use to build libkernlib.a and libkerngent.a.) Please also let me know if you need the intermediate .f and .o files built with gfortran-4.3 -O3. -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=35659