From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 25427 invoked by alias); 18 May 2004 13:50:57 -0000 Mailing-List: contact gcc-bugs-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Archive: List-Post: List-Help: Sender: gcc-bugs-owner@gcc.gnu.org Received: (qmail 25416 invoked by uid 48); 18 May 2004 13:50:55 -0000 Date: Tue, 18 May 2004 23:35:00 -0000 From: "td at pre-secure dot de" To: gcc-bugs@gcc.gnu.org Message-ID: <20040518135051.15517.td@pre-secure.de> Reply-To: gcc-bugzilla@gcc.gnu.org Subject: [Bug c/15517] New: -O2 and higher removes some static const X-Bugzilla-Reason: CC X-SW-Source: 2004-05/txt/msg01995.txt.bz2 List-Id: The problem arises with ffmpeg/libavcodec (no version known) included in transcode 0.6.11 (http://www.theorie.physik.uni-goettingen.de/~ostreich/transcode/) # Cmdline triggering the bug (sources configured with a plain ./configure) /tmp/gcc/transcode-0.6.11/ffmpeg/libavcodec> gcc -DHAVE_CONFIG_H -I../.. -I. -I../.. -I. -I../../ -O2 -g -Wall -ffast-math -DARCH_X86 -DHAVE_MMX -DHAVE_AV_CONFIG_H -D_GNU_SOURCE --include=../av_config.h -g -O3 -O3 -fomit-frame-pointer -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 -MT dsputil_mmx.o -MD -MP -MF ".deps/dsputil_mmx.Tpo" -c -o dsputil_mmx.o `test -f 'i386/dsputil_mmx.c' || echo './'`i386/dsputil_mmx.c; # Compiler output i386/dsputil_mmx_rnd.h:362: warning: `avg_no_rnd_pixels8_l2_mmx' defined but not used i386/dsputil_mmx_rnd.h:409: warning: `avg_no_rnd_pixels16_l2_mmx' defined but not used i386/dsputil_mmx_avg.h:57: warning: `put_pixels8_l2_3dnow' defined but not used i386/dsputil_mmx_avg.h:129: warning: `put_pixels16_l2_3dnow' defined but not used i386/dsputil_mmx_avg.h:57: warning: `put_pixels8_l2_mmx2' defined but not used i386/dsputil_mmx_avg.h:129: warning: `put_pixels16_l2_mmx2' defined but not used # That's the code /tmp/gcc/transcode-0.6.11/ffmpeg/libavcodec> grep ff_pw_.. i386/dsputil_mmx.c | grep static static const uint64_t ff_pw_20 __attribute__ ((aligned(8))) = 0x0014001400140014ULL; static const uint64_t ff_pw_3 __attribute__ ((aligned(8))) = 0x0003000300030003ULL; static const uint64_t ff_pw_16 __attribute__ ((aligned(8))) = 0x0010001000100010ULL; static const uint64_t ff_pw_15 __attribute__ ((aligned(8))) = 0x000F000F000F000FULL; # That's what's missing /tmp/gcc/transcode-0.6.11/ffmpeg/libavcodec> nm dsputil_mmx.o | grep ff_pw 00000008 r ff_pw_15 00000000 r ff_pw_16 U ff_pw_20 U ff_pw_3 Resolution: ----------- Replace -O2 and -O3 by -O1 Versions etc.: -------------- # gcc -v Reading specs from /usr/lib/gcc-lib/i586-suse-linux/3.3.3/specs Configured with: ../configure --enable-threads=posix --prefix=/usr --with-local-prefix=/usr/local --infodir=/usr/share/info --mandir=/usr/share/man --enable-languages=c,c++,f77,objc,java,ada --disable-checking --libdir=/usr/lib --enable-libgcj --with-gxx-include-dir=/usr/include/g++ --with-slibdir=/lib --with-system-zlib --enable-shared --enable-__cxa_atexit i586-suse-linux Thread model: posix gcc version 3.3.3 (SuSE Linux) # Distribution: SuSE 9.1 # cat /proc/cpuinfo processor : 0 vendor_id : GenuineIntel cpu family : 15 model : 2 model name : Mobile Intel(R) Pentium(R) 4 - M CPU 2.00GHz stepping : 7 cpu MHz : 1998.497 cache size : 512 KB fdiv_bug : no hlt_bug : no f00f_bug : no coma_bug : no fpu : yes fpu_exception : yes cpuid level : 2 wp : yes flags : fpu vme de pse tsc msr pae mce cx8 sep mtrr pge mca cmov pat pse36 clflush dts acpi mmx fxsr sse sse2 ss ht tm pbe cid bogomips : 3956.73 -- Summary: -O2 and higher removes some static const Product: gcc Version: 3.3.3 Status: UNCONFIRMED Severity: normal Priority: P2 Component: c AssignedTo: unassigned at gcc dot gnu dot org ReportedBy: td at pre-secure dot de CC: gcc-bugs at gcc dot gnu dot org GCC build triplet: (?) i586-suse-linux GCC host triplet: i586-suse-linux GCC target triplet: i586-suse-linux http://gcc.gnu.org/bugzilla/show_bug.cgi?id=15517