This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug target/35659] Miscompiled code with -O2 (but not with -O2 -funroll-loops) on ia64



------- 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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]