[LLVMbugs] [Bug 4969] New: Once compiling a file comes from Amaya, using -O2 fail but without it succeed.

bugzilla-daemon at cs.uiuc.edu bugzilla-daemon at cs.uiuc.edu
Sun Sep 13 01:28:37 PDT 2009


http://llvm.org/bugs/show_bug.cgi?id=4969

           Summary: Once compiling a file comes from Amaya, using -O2 fail
                    but without it succeed.
           Product: libraries
           Version: 2.6
          Platform: PC
        OS/Version: Linux
            Status: NEW
          Severity: normal
          Priority: P2
         Component: Interprocedural Optimizations
        AssignedTo: unassignedbugs at nondot.org
        ReportedBy: yonggangluo at hotmail.com
                CC: llvmbugs at cs.uiuc.edu


dreamkxd at dreamkxd-desktop:~/src/Amaya/Amaya/objs/thotlib$
/usr/lib/llvm2.6/gcc-4.2/bin/llvm-g++ -emit-llvm -S -v -O2 -Wall -x c++
-D__cplusplus -D_UNIX -D_GL -D_WX -DHAVE_CONFIG_H -I.. -I../../amaya/xpm
-I../../thotlib/include -I../../thotlib/internals/var
-I../../thotlib/internals/h -I../../thotlib/internals/f  
-I/home/dreamkxd/src/Amaya/wxWidgets/src/png
-I/home/dreamkxd/src/Amaya/wxWidgets/src/jpeg
-I/home/dreamkxd/src/Amaya/wxWidgets/src/tiff
-I/home/dreamkxd/src/Amaya/Amaya/objs/wxWidgets_RELEASE/lib/wx/include/gtk2-unicode-release-static-2.8
-I/home/dreamkxd/src/Amaya/wxWidgets/include
-I/home/dreamkxd/src/Amaya/wxWidgets/contrib/include -D_FILE_OFFSET_BITS=64
-D_LARGE_FILES -D__WXGTK__ -pthread
-I/home/dreamkxd/src/Amaya/Amaya/objs/Mesa/include   -I/usr/include/freetype2 
-c ../../thotlib/presentation/presrules.c -o presentation/presrules.o
Using built-in specs.
Target: i686-linux-gnu
Configured with: /mnt/src/llvm-gcc/configure --host=i686-linux-gnu
--build=i686-linux-gnu --prefix=/usr/lib/llvm2.6/gcc-4.2
--enable-languages=c,c++ --program-prefix=llvm- --enable-llvm=/usr/lib/llvm2.6
--enable-threads --disable-nls --disable-shared --disable-multilib
--disable-bootstrap
Thread model: posix
gcc version 4.2.1 (Based on Apple Inc. build 5649) (LLVM build)
 /usr/lib/llvm2.6/gcc-4.2/libexec/gcc/i686-linux-gnu/4.2.1/cc1plus -quiet -v
-I.. -I../../amaya/xpm -I../../thotlib/include -I../../thotlib/internals/var
-I../../thotlib/internals/h -I../../thotlib/internals/f
-I/home/dreamkxd/src/Amaya/wxWidgets/src/png
-I/home/dreamkxd/src/Amaya/wxWidgets/src/jpeg
-I/home/dreamkxd/src/Amaya/wxWidgets/src/tiff
-I/home/dreamkxd/src/Amaya/Amaya/objs/wxWidgets_RELEASE/lib/wx/include/gtk2-unicode-release-static-2.8
-I/home/dreamkxd/src/Amaya/wxWidgets/include
-I/home/dreamkxd/src/Amaya/wxWidgets/contrib/include
-I/home/dreamkxd/src/Amaya/Amaya/objs/Mesa/include -I/usr/include/freetype2
-D_GNU_SOURCE -D_REENTRANT -D__cplusplus -D_UNIX -D_GL -D_WX -DHAVE_CONFIG_H
-D_FILE_OFFSET_BITS=64 -D_LARGE_FILES -D__WXGTK__
../../thotlib/presentation/presrules.c -emit-llvm -quiet -dumpbase presrules.c
-mtune=generic -auxbase-strip presentation/presrules.o -O2 -Wall -version -o
presentation/presrules.o
ignoring nonexistent directory
"/usr/lib/llvm2.6/gcc-4.2/lib/gcc/i686-linux-gnu/4.2.1/../../../../i686-linux-gnu/include"
ignoring nonexistent directory
"/home/dreamkxd/src/Amaya/wxWidgets/contrib/include"
#include "..." search starts here:
#include <...> search starts here:
 ..
 ../../amaya/xpm
 ../../thotlib/include
 ../../thotlib/internals/var
 ../../thotlib/internals/h
 ../../thotlib/internals/f
 /home/dreamkxd/src/Amaya/wxWidgets/src/png
 /home/dreamkxd/src/Amaya/wxWidgets/src/jpeg
 /home/dreamkxd/src/Amaya/wxWidgets/src/tiff

/home/dreamkxd/src/Amaya/Amaya/objs/wxWidgets_RELEASE/lib/wx/include/gtk2-unicode-release-static-2.8
 /home/dreamkxd/src/Amaya/wxWidgets/include
 /home/dreamkxd/src/Amaya/Amaya/objs/Mesa/include
 /usr/include/freetype2

/usr/lib/llvm2.6/gcc-4.2/lib/gcc/i686-linux-gnu/4.2.1/../../../../include/c++/4.2.1

/usr/lib/llvm2.6/gcc-4.2/lib/gcc/i686-linux-gnu/4.2.1/../../../../include/c++/4.2.1/i686-linux-gnu

/usr/lib/llvm2.6/gcc-4.2/lib/gcc/i686-linux-gnu/4.2.1/../../../../include/c++/4.2.1/backward
 /usr/local/include
 /usr/lib/llvm2.6/gcc-4.2/include
 /usr/lib/llvm2.6/gcc-4.2/lib/gcc/i686-linux-gnu/4.2.1/include
 /usr/include
End of search list.
GNU C++ version 4.2.1 (Based on Apple Inc. build 5649) (LLVM build)
(i686-linux-gnu)
        compiled by GNU C version 4.2.1 (Based on Apple Inc. build 5636) (LLVM
build).
GGC heuristics: --param ggc-min-expand=64 --param ggc-min-heapsize=63683
Compiler executable checksum: a994527e259f35a25d2a7ed449fb1e8b
../../thotlib/presentation/presrules.c:5016: internal compiler error:
Segmentation fault
Please submit a full bug report,
with preprocessed source if appropriate.
See <URL:http://llvm.org/bugs/> for instructions.


Because of dependence is too much, so I didn't attach other files.






dreamkxd at dreamkxd-desktop:~/src/Amaya/Amaya/objs/thotlib$
/usr/lib/llvm2.6/gcc-4.2/bin/llvm-g++ -emit-llvm -S -v -Wall -x c++
-D__cplusplus -D_UNIX -D_GL -D_WX -DHAVE_CONFIG_H -I.. -I../../amaya/xpm
-I../../thotlib/include -I../../thotlib/internals/var
-I../../thotlib/internals/h -I../../thotlib/internals/f  
-I/home/dreamkxd/src/Amaya/wxWidgets/src/png
-I/home/dreamkxd/src/Amaya/wxWidgets/src/jpeg
-I/home/dreamkxd/src/Amaya/wxWidgets/src/tiff
-I/home/dreamkxd/src/Amaya/Amaya/objs/wxWidgets_RELEASE/lib/wx/include/gtk2-unicode-release-static-2.8
-I/home/dreamkxd/src/Amaya/wxWidgets/include
-I/home/dreamkxd/src/Amaya/wxWidgets/contrib/include -D_FILE_OFFSET_BITS=64
-D_LARGE_FILES -D__WXGTK__ -pthread
-I/home/dreamkxd/src/Amaya/Amaya/objs/Mesa/include   -I/usr/include/freetype2 
-c ../../thotlib/presentation/presrules.c -o presentation/presrules.o
Using built-in specs.
Target: i686-linux-gnu
Configured with: /mnt/src/llvm-gcc/configure --host=i686-linux-gnu
--build=i686-linux-gnu --prefix=/usr/lib/llvm2.6/gcc-4.2
--enable-languages=c,c++ --program-prefix=llvm- --enable-llvm=/usr/lib/llvm2.6
--enable-threads --disable-nls --disable-shared --disable-multilib
--disable-bootstrap
Thread model: posix
gcc version 4.2.1 (Based on Apple Inc. build 5649) (LLVM build)
 /usr/lib/llvm2.6/gcc-4.2/libexec/gcc/i686-linux-gnu/4.2.1/cc1plus -quiet -v
-I.. -I../../amaya/xpm -I../../thotlib/include -I../../thotlib/internals/var
-I../../thotlib/internals/h -I../../thotlib/internals/f
-I/home/dreamkxd/src/Amaya/wxWidgets/src/png
-I/home/dreamkxd/src/Amaya/wxWidgets/src/jpeg
-I/home/dreamkxd/src/Amaya/wxWidgets/src/tiff
-I/home/dreamkxd/src/Amaya/Amaya/objs/wxWidgets_RELEASE/lib/wx/include/gtk2-unicode-release-static-2.8
-I/home/dreamkxd/src/Amaya/wxWidgets/include
-I/home/dreamkxd/src/Amaya/wxWidgets/contrib/include
-I/home/dreamkxd/src/Amaya/Amaya/objs/Mesa/include -I/usr/include/freetype2
-D_GNU_SOURCE -D_REENTRANT -D__cplusplus -D_UNIX -D_GL -D_WX -DHAVE_CONFIG_H
-D_FILE_OFFSET_BITS=64 -D_LARGE_FILES -D__WXGTK__
../../thotlib/presentation/presrules.c -emit-llvm -quiet -dumpbase presrules.c
-mtune=generic -auxbase-strip presentation/presrules.o -Wall -version -o
presentation/presrules.o
ignoring nonexistent directory
"/usr/lib/llvm2.6/gcc-4.2/lib/gcc/i686-linux-gnu/4.2.1/../../../../i686-linux-gnu/include"
ignoring nonexistent directory
"/home/dreamkxd/src/Amaya/wxWidgets/contrib/include"
#include "..." search starts here:
#include <...> search starts here:
 ..
 ../../amaya/xpm
 ../../thotlib/include
 ../../thotlib/internals/var
 ../../thotlib/internals/h
 ../../thotlib/internals/f
 /home/dreamkxd/src/Amaya/wxWidgets/src/png
 /home/dreamkxd/src/Amaya/wxWidgets/src/jpeg
 /home/dreamkxd/src/Amaya/wxWidgets/src/tiff

/home/dreamkxd/src/Amaya/Amaya/objs/wxWidgets_RELEASE/lib/wx/include/gtk2-unicode-release-static-2.8
 /home/dreamkxd/src/Amaya/wxWidgets/include
 /home/dreamkxd/src/Amaya/Amaya/objs/Mesa/include
 /usr/include/freetype2

/usr/lib/llvm2.6/gcc-4.2/lib/gcc/i686-linux-gnu/4.2.1/../../../../include/c++/4.2.1

/usr/lib/llvm2.6/gcc-4.2/lib/gcc/i686-linux-gnu/4.2.1/../../../../include/c++/4.2.1/i686-linux-gnu

/usr/lib/llvm2.6/gcc-4.2/lib/gcc/i686-linux-gnu/4.2.1/../../../../include/c++/4.2.1/backward
 /usr/local/include
 /usr/lib/llvm2.6/gcc-4.2/include
 /usr/lib/llvm2.6/gcc-4.2/lib/gcc/i686-linux-gnu/4.2.1/include
 /usr/include
End of search list.
GNU C++ version 4.2.1 (Based on Apple Inc. build 5649) (LLVM build)
(i686-linux-gnu)
        compiled by GNU C version 4.2.1 (Based on Apple Inc. build 5636) (LLVM
build).
GGC heuristics: --param ggc-min-expand=64 --param ggc-min-heapsize=127366
Compiler executable checksum: a994527e259f35a25d2a7ed449fb1e8b


As you can see, once I cancel the -O2 option, it's can be compiled correctly:)
So it's must be the opt problem...
I generate the ll file.

By the way, the source code of presrules.c can be download from 
http://www.w3.org/Amaya/User/SourceDist.html
The exact source code I downloaded is
http://wam.inrialpes.fr/software/amaya/amaya-fullsrc-11.3-pre.tgz


-- 
Configure bugmail: http://llvm.org/bugs/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are on the CC list for the bug.



More information about the llvm-bugs mailing list