http://gcc.gnu.org/bugzilla/show_bug.cgi?id=47617
Summary: SSE rounding mode works -g, not -O3 Product: gcc Version: 4.3.2 Status: UNCONFIRMED Severity: normal Priority: P3 Component: c AssignedTo: unassig...@gcc.gnu.org ReportedBy: cck0...@yahoo.com Created attachment 23252 --> http://gcc.gnu.org/bugzilla/attachment.cgi?id=23252 generated .i file Hi folks, I'm working with SSE intrinsics and think I have a rounding problem. When I try to change modes with _MM_SET_ROUNDING_MODE, I see different results when compiled "-g", but not "-O3". What am I missing? thanks! Using built-in specs. Target: i386-redhat-linux Configured with: ../configure --prefix=/usr --mandir=/usr/share/man --infodir=/usr/share/info --with-bugurl =http://bugzilla.redhat.com/bugzilla --enable-bootstrap --enable-shared --enable-threads=posix --enable-che cking=release --with-system-zlib --enable-__cxa_atexit --disable-libunwind-exceptions --enable-languages=c, c++,objc,obj-c++,java,fortran,ada --enable-java-awt=gtk --disable-dssi --enable-plugin --with-java-home=/us r/lib/jvm/java-1.5.0-gcj-1.5.0.0/jre --enable-libgcj-multifile --enable-java-maintainer-mode --with-ecj-jar =/usr/share/java/eclipse-ecj.jar --disable-libjava-multilib --with-cpu=generic --build=i386-redhat-linux Thread model: posix gcc version 4.3.2 20081105 (Red Hat 4.3.2-7) (GCC) COLLECT_GCC_OPTIONS='-O3' '-Wall' '-o' 'round' '-msse' '-mmmx' '-save-temps' '-v' '-mtune=generic' /usr/libexec/gcc/i386-redhat-linux/4.3.2/cc1 -E -quiet -v round.c -msse -mmmx -mtune=generic -Wall -O3 -fp ch-preprocess -o round.i ignoring nonexistent directory "/usr/lib/gcc/i386-redhat-linux/4.3.2/include-fixed" ignoring nonexistent directory "/usr/lib/gcc/i386-redhat-linux/4.3.2/../../../../i386-redhat-linux/include" #include "..." search starts here: #include <...> search starts here: /usr/local/include /usr/lib/gcc/i386-redhat-linux/4.3.2/include /usr/include End of search list. COLLECT_GCC_OPTIONS='-O3' '-Wall' '-o' 'round' '-msse' '-mmmx' '-save-temps' '-v' '-mtune=generic' /usr/libexec/gcc/i386-redhat-linux/4.3.2/cc1 -fpreprocessed round.i -quiet -dumpbase round.c -msse -mmmx - mtune=generic -auxbase round -O3 -Wall -version -o round.s GNU C (GCC) version 4.3.2 20081105 (Red Hat 4.3.2-7) (i386-redhat-linux) compiled by GNU C version 4.3.2 20081105 (Red Hat 4.3.2-7), GMP version 4.2.2, MPFR version 2.3.2. GGC heuristics: --param ggc-min-expand=55 --param ggc-min-heapsize=48000 Compiler executable checksum: 3bee52601079f736b7b63b762646f4ba round.c: In function ‘test_sse1_feature’: round.c:150: warning: unused variable ‘sig’ round.c:150: warning: unused variable ‘extensions’ round.c:149: warning: ‘edx’ may be used uninitialized in this function COLLECT_GCC_OPTIONS='-O3' '-Wall' '-o' 'round' '-msse' '-mmmx' '-save-temps' '-v' '-mtune=generic' as -V -Qy -o round.o round.s GNU assembler version 2.18.50.0.9 (i386-redhat-linux) using BFD version version 2.18.50.0.9-8.fc10 20080822 COMPILER_PATH=/usr/libexec/gcc/i386-redhat-linux/4.3.2/:/usr/libexec/gcc/i386-redhat-linux/4.3.2/:/usr/libe xec/gcc/i386-redhat-linux/:/usr/lib/gcc/i386-redhat-linux/4.3.2/:/usr/lib/gcc/i386-redhat-linux/:/usr/libex ec/gcc/i386-redhat-linux/4.3.2/:/usr/libexec/gcc/i386-redhat-linux/:/usr/lib/gcc/i386-redhat-linux/4.3.2/:/ usr/lib/gcc/i386-redhat-linux/ LIBRARY_PATH=/usr/lib/gcc/i386-redhat-linux/4.3.2/:/usr/lib/gcc/i386-redhat-linux/4.3.2/:/usr/lib/gcc/i386- redhat-linux/4.3.2/../../../:/lib/:/usr/lib/ COLLECT_GCC_OPTIONS='-O3' '-Wall' '-o' 'round' '-msse' '-mmmx' '-save-temps' '-v' '-mtune=generic' /usr/libexec/gcc/i386-redhat-linux/4.3.2/collect2 --eh-frame-hdr --build-id -m elf_i386 --hash-style=gnu - dynamic-linker /lib/ld-linux.so.2 -o round /usr/lib/gcc/i386-redhat-linux/4.3.2/../../../crt1.o /usr/lib/gc c/i386-redhat-linux/4.3.2/../../../crti.o /usr/lib/gcc/i386-redhat-linux/4.3.2/crtbegin.o -L/usr/lib/gcc/i3 86-redhat-linux/4.3.2 -L/usr/lib/gcc/i386-redhat-linux/4.3.2 -L/usr/lib/gcc/i386-redhat-linux/4.3.2/../../. . round.o -lgcc --as-needed -lgcc_s --no-as-needed -lc -lgcc --as-needed -lgcc_s --no-as-needed /usr/lib/gc c/i386-redhat-linux/4.3.2/crtend.o /usr/lib/gcc/i386-redhat-linux/4.3.2/../../../crtn.o