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 c/34841] New: 'make check' of libsndfile-1.0.17 fails with gcc-4.2.2 -O2 optimization, OK with -O1 one


X-Bugzilla-Reason: CC

I've noticed the problem while building libsndfile-1.0.17 from source after   
switching from SUSE 10.2 to SUSE 10.3, and thus from gcc-4.1.2 to gcc-4.2.1.

I have built myself a number of 'gcc' versions: 3.4.6, 4.2.0, 4.2.1, 4.2.2.

With gcc-3.4.6, gcc-4.1.2 default build of libsndfile-1.0.17 (i.e. -O2
optimization) progresses just fine, 'make check' does not fail.

With all the above gcc-4.2.x default build fails during 'make check' with
these error messages:


"
Line 765: Signal is all zeros (-27260928, 0xFE600800).
make[1]: *** [wav-tests] Error 1
make[1]: Leaving directory
`/mnt/sda8/sergei/gcc4.2.x-O2_bug/gcc-4.2.2-O2/libsndfile-1.0.17/tests'
make: *** [check-recursive] Error 1
".

So, I believe, the bug was introduced into gcc-4.2.0 and is still there.

Setting '-O1' on 'configure' command line like this:

CFLAGS=-O1

allows 'make check' to complete normally.


One can see examples of successful and failing runs in the to be uploaded

gcc4.2.x-O2_bug.tar.gz

tarball.

When unpackaged, the tarball should produce three directories of interest:

gcc4.2.x-O2_bug/gcc-4.2.2-O2/libsndfile-1.0.17
gcc4.2.x-O2_bug/gcc-4.2.2-O1/libsndfile-1.0.17
gcc4.2.x-O2_bug/gcc-3.4.6-O2/libsndfile-1.0.17
.

In the above directories one can see 'make_check.log' files and

gcc4.2.x-O2_bug/gcc-4.2.2-O2/libsndfile-1.0.17/make_check.log

file contains the above error messages indicating the failure.

Likewise, each of the above directories contains a simple 'run.sh'
script looking like this:

"
sergei@amdam2:/mnt/sda8/sergei> cat
gcc4.2.x-O2_bug/gcc-4.2.2-O1/libsndfile-1.0.17/run.sh
#!/bin/sh -v

make clean 1>make_clean.log 2>&1

./configure CC=/maxtor5/sergei/AppsFromScratchWD/install/gcc-4.2.2/bin/gcc
CFLAGS=-O1 1>configure.log 2>&1 \
&& make 1>make.log 2>&1 \
&& make check 1>make_check.log 2>&1
sergei@amdam2:/mnt/sda8/sergei>
".

So, one can reproduce the bug (and the correct behavior) by changing the
path after "CC=" and running the script as "./run.sh".

Since I am not a libsndfile-1.0.17 developer, I am not familiar with inner
workings of the library, hopefully folks on libsndfile-devel@mega-nerd.com
list (unfortunately, the list does not have WEB archive) will be able to help.

People on the list confirm the problem.


As you all probably already know, 'libsndfile' "lives" here:

http://www.mega-nerd.com/libsndfile/
.


-- 
           Summary: 'make check' of libsndfile-1.0.17 fails with gcc-4.2.2 -
                    O2 optimization, OK with -O1 one
           Product: gcc
           Version: 4.2.2
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: c
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: sergstesh at yahoo dot com
  GCC host triplet: i686-linux-gnu


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=34841


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