[Bug 807156] Re: GCC (g++):internal compiler error: in extract_insn, at recog.c:2104
Bug Watch Updater
807156 at bugs.launchpad.net
Tue Jul 12 06:59:26 UTC 2011
Launchpad has imported 11 comments from the remote bug at
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=49670.
If you reply to an imported comment from within Launchpad, your comment
will be sent to the remote bug automatically. Read more about
Launchpad's inter-bugtracker facilities at
https://help.launchpad.net/InterBugTracking.
------------------------------------------------------------------------
On 2011-07-07T18:26:27+00:00 Jeffrey Walton wrote:
Sorry if this was previously reported. Searching returned an error
stating I used an invalid file extension.
I was attempting to compile the latest Crypto++ (svn checkout
https://cryptopp.svn.sourceforge.net/svnroot/cryptopp/trunk/c5 cryptopp)
on a Dell GX280 (32 bit Pentium 4). Here's the internal compiler error:
$ export PREFIX=/usr/local; make
g++ -DNDEBUG -g -O2 -m32 -mtune=pentium4 -march=native -pipe -c 3way.cpp
g++ -DNDEBUG -g -O2 -m32 -mtune=pentium4 -march=native -pipe -c adler32.cpp
g++ -DNDEBUG -g -O2 -m32 -mtune=pentium4 -march=native -pipe -c algebra.cpp
g++ -DNDEBUG -g -O2 -m32 -mtune=pentium4 -march=native -pipe -c algparam.cpp
g++ -DNDEBUG -g -O2 -m32 -mtune=pentium4 -march=native -pipe -c arc4.cpp
g++ -DNDEBUG -g -O2 -m32 -mtune=pentium4 -march=native -pipe -c asn.cpp
asn.cpp: In member function ‘void CryptoPP::OID::DEREncode(CryptoPP::BufferedTransformation&) const’:
asn.cpp:254:1: error: unrecognizable insn:
(insn 194 178 195 2 asn.cpp:248 (set (reg:SI 2 cx)
(mem:QI (plus:SI (reg/f:SI 1 dx [orig:61 D.44160 ] [61])
(const_int 4 [0x4])) [16 S1 A32])) -1 (nil))
asn.cpp:254:1: internal compiler error: in extract_insn, at recog.c:2104
Please submit a full bug report,
with preprocessed source if appropriate.
See <file:///usr/share/doc/gcc-4.5/README.Bugs> for instructions.
make: *** [asn.o] Error 1
===================================================================
Additional information
I modified Crypto++'s GNUMakefile a bit:
OLD:
CXXFLAGS = -DNDEBUG -g O2
MOD:
CXXFLAGS = -DNDEBUG -g -O2 -m32 -mtune=pentium4
When I invoked `make` I used the following:
$ export PREFIX=/usr/local; make
$ g++ --version
g++ (Ubuntu/Linaro 4.5.2-8ubuntu4) 4.5.2
Copyright (C) 2010 Free Software Foundation, Inc.
This is free software; see the source for copying conditions. There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
$ uname -a
Linux bruno 2.6.38-8-generic #42-Ubuntu SMP Mon Apr 11 03:31:50 UTC 2011 i686 i686 i386 GNU/Linux
jeffrey at bruno:~/Desktop/order-status$
Reply at: https://bugs.launchpad.net/gcc/+bug/807156/comments/0
------------------------------------------------------------------------
On 2011-07-08T00:45:17+00:00 Jeffrey Walton wrote:
Using the stock Crypto++ makefile did not help:
g++ -DNDEBUG -g -O2 -mtune=native -pipe -c 3way.cpp
g++ -DNDEBUG -g -O2 -mtune=native -pipe -c adler32.cpp
g++ -DNDEBUG -g -O2 -mtune=native -pipe -c algebra.cpp
g++ -DNDEBUG -g -O2 -mtune=native -pipe -c algparam.cpp
g++ -DNDEBUG -g -O2 -mtune=native -pipe -c arc4.cpp
g++ -DNDEBUG -g -O2 -mtune=native -pipe -c asn.cpp
asn.cpp: In member function ‘void
CryptoPP::OID::DEREncode(CryptoPP::BufferedTransformation&) const’:
asn.cpp:254:1: error: unrecognizable insn:
(insn 194 178 195 2 asn.cpp:248 (set (reg:SI 2 cx)
(mem:QI (plus:SI (reg/f:SI 1 dx [orig:61 D.44160 ] [61])
(const_int 4 [0x4])) [16 S1 A32])) -1 (nil))
asn.cpp:254:1: internal compiler error: in extract_insn, at recog.c:2104
Please submit a full bug report,
with preprocessed source if appropriate.
See <file:///usr/share/doc/gcc-4.5/README.Bugs> for instructions.
make: *** [asn.o] Error 1
Reply at: https://bugs.launchpad.net/gcc/+bug/807156/comments/2
------------------------------------------------------------------------
On 2011-07-08T00:47:53+00:00 Jeffrey Walton wrote:
For completeness, here's the function
(http://www.cryptopp.com/docs/ref/asn_8cpp_source.html):
00244 void OID::DEREncode(BufferedTransformation &bt) const
00245 {
00246 assert(m_values.size() >= 2);
00247 ByteQueue temp;
00248 temp.Put(byte(m_values[0] * 40 + m_values[1]));
00249 for (size_t i=2; i<m_values.size(); i++)
00250 EncodeValue(temp, m_values[i]);
00251 bt.Put(OBJECT_IDENTIFIER);
00252 DERLengthEncode(bt, temp.CurrentSize());
00253 temp.TransferTo(bt);
00254 }
Reply at: https://bugs.launchpad.net/gcc/+bug/807156/comments/3
------------------------------------------------------------------------
On 2011-07-08T07:54:33+00:00 Ubizjak wrote:
Please add all information and especially preprocessed source, as
explained in http://gcc.gnu.org/bugs/#detailed
Reply at: https://bugs.launchpad.net/gcc/+bug/807156/comments/4
------------------------------------------------------------------------
On 2011-07-08T08:07:43+00:00 Jeffrey Walton wrote:
(In reply to comment #0)
> Sorry if this was previously reported. Searching returned an error stating I
> used an invalid file extension.
>
> I was attempting to compile the latest Crypto++ (svn checkout
> https://cryptopp.svn.sourceforge.net/svnroot/cryptopp/trunk/c5 cryptopp) on a
> Dell GX280 (32 bit Pentium 4). Here's the internal compiler error:
>
> $ export PREFIX=/usr/local; make
> g++ -DNDEBUG -g -O2 -m32 -mtune=pentium4 -march=native -pipe -c 3way.cpp
> g++ -DNDEBUG -g -O2 -m32 -mtune=pentium4 -march=native -pipe -c adler32.cpp
> g++ -DNDEBUG -g -O2 -m32 -mtune=pentium4 -march=native -pipe -c algebra.cpp
> g++ -DNDEBUG -g -O2 -m32 -mtune=pentium4 -march=native -pipe -c algparam.cpp
> g++ -DNDEBUG -g -O2 -m32 -mtune=pentium4 -march=native -pipe -c arc4.cpp
> g++ -DNDEBUG -g -O2 -m32 -mtune=pentium4 -march=native -pipe -c asn.cpp
> asn.cpp: In member function ‘void
> CryptoPP::OID::DEREncode(CryptoPP::BufferedTransformation&) const’:
> asn.cpp:254:1: error: unrecognizable insn:
> (insn 194 178 195 2 asn.cpp:248 (set (reg:SI 2 cx)
> (mem:QI (plus:SI (reg/f:SI 1 dx [orig:61 D.44160 ] [61])
> (const_int 4 [0x4])) [16 S1 A32])) -1 (nil))
> asn.cpp:254:1: internal compiler error: in extract_insn, at recog.c:2104
> Please submit a full bug report,
> with preprocessed source if appropriate.
> See <file:///usr/share/doc/gcc-4.5/README.Bugs> for instructions.
> make: *** [asn.o] Error 1
>
> [SNIP]
>
> $ g++ --version
> g++ (Ubuntu/Linaro 4.5.2-8ubuntu4) 4.5.2
> Copyright (C) 2010 Free Software Foundation, Inc.
> This is free software; see the source for copying conditions. There is NO
> warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
It looks like removing `-mtune=native` fixed it:
$cat GNUMakefile
...
ifneq ($(GCC42_OR_LATER),0)
ifeq ($(UNAME),Darwin)
CXXFLAGS += -arch x86_64 -arch i386
else
# CXXFLAGS += -march=native
endif
endif
...
$ make
g++ -DNDEBUG -g -O2 -pipe -c 3way.cpp
g++ -DNDEBUG -g -O2 -pipe -c adler32.cpp
g++ -DNDEBUG -g -O2 -pipe -c algebra.cpp
g++ -DNDEBUG -g -O2 -pipe -c algparam.cpp
g++ -DNDEBUG -g -O2 -pipe -c arc4.cpp
g++ -DNDEBUG -g -O2 -pipe -c asn.cpp
g++ -DNDEBUG -g -O2 -pipe -c authenc.cpp
g++ -DNDEBUG -g -O2 -pipe -c base32.cpp
g++ -DNDEBUG -g -O2 -pipe -c base64.cpp
...
Reply at: https://bugs.launchpad.net/gcc/+bug/807156/comments/5
------------------------------------------------------------------------
On 2011-07-08T08:35:11+00:00 Jeffrey Walton wrote:
Created attachment 24710
File asn.s from class file causing internal compiler error
Reply at: https://bugs.launchpad.net/gcc/+bug/807156/comments/8
------------------------------------------------------------------------
On 2011-07-08T08:35:55+00:00 Jeffrey Walton wrote:
Created attachment 24711
File asn.ii from class causing internal compiler error
Reply at: https://bugs.launchpad.net/gcc/+bug/807156/comments/9
------------------------------------------------------------------------
On 2011-07-08T08:36:08+00:00 Jeffrey Walton wrote:
(In reply to comment #3)
> Please add all information and especially preprocessed source, as explained in
> http://gcc.gnu.org/bugs/#detailed
Crypto++ sources:
`svn checkout https://cryptopp.svn.sourceforge.net/svnroot/cryptopp/trunk/c5 cryptopp`
Output from command is below, and asn.s attached:
jeffrey at bruno:~/Desktop/cryptopp$ make clean
...
jeffrey at bruno:~/Desktop/cryptopp$ gcc -v -save-temps -DNDEBUG -g -O2 -march=native -pipe -c asn.cpp
gcc: warning: -pipe ignored because -save-temps specified
Using built-in specs.
COLLECT_GCC=gcc
COLLECT_LTO_WRAPPER=/usr/lib/i386-linux-gnu/gcc/i686-linux-gnu/4.5.2/lto-wrapper
Target: i686-linux-gnu
Configured with: ../src/configure -v --with-pkgversion='Ubuntu/Linaro 4.5.2-8ubuntu4' --with-bugurl=file:///usr/share/doc/gcc-4.5/README.Bugs --enable-languages=c,c++,fortran,objc,obj-c++ --prefix=/usr --program-suffix=-4.5 --enable-shared --enable-multiarch --with-multiarch-defaults=i386-linux-gnu --enable-linker-build-id --with-system-zlib --libexecdir=/usr/lib/i386-linux-gnu --without-included-gettext --enable-threads=posix --with-gxx-include-dir=/usr/include/c++/4.5 --libdir=/usr/lib/i386-linux-gnu --enable-nls --with-sysroot=/ --enable-clocale=gnu --enable-libstdcxx-debug --enable-libstdcxx-time=yes --enable-plugin --enable-gold --enable-ld=default --with-plugin-ld=ld.gold --enable-objc-gc --enable-targets=all --disable-werror --with-arch-32=i686 --with-tune=generic --enable-checking=release --build=i686-linux-gnu --host=i686-linux-gnu --target=i686-linux-gnu
Thread model: posix
gcc version 4.5.2 (Ubuntu/Linaro 4.5.2-8ubuntu4)
COLLECT_GCC_OPTIONS='-v' '-save-temps' '-DNDEBUG' '-g' '-O2' '-pipe' '-c'
/usr/lib/i386-linux-gnu/gcc/i686-linux-gnu/4.5.2/cc1plus -E -quiet -v -D_GNU_SOURCE -DNDEBUG asn.cpp -D_FORTIFY_SOURCE=2 -march=prescott --param l1-cache-size=16 --param l1-cache-line-size=64 --param l2-cache-size=1024 -mtune=prescott -g -fworking-directory -O2 -fpch-preprocess -fstack-protector -o asn.ii
ignoring nonexistent directory "/usr/local/include/i386-linux-gnu"
ignoring nonexistent directory "/usr/lib/i386-linux-gnu/gcc/i686-linux-gnu/4.5.2/../../../../../i686-linux-gnu/include"
#include "..." search starts here:
#include <...> search starts here:
/usr/include/c++/4.5
/usr/include/c++/4.5/i686-linux-gnu
/usr/include/c++/4.5/backward
/usr/local/include
/usr/lib/i386-linux-gnu/gcc/i686-linux-gnu/4.5.2/include
/usr/lib/i386-linux-gnu/gcc/i686-linux-gnu/4.5.2/include-fixed
/usr/include/i386-linux-gnu
/usr/include
End of search list.
COLLECT_GCC_OPTIONS='-v' '-save-temps' '-DNDEBUG' '-g' '-O2' '-pipe' '-c'
/usr/lib/i386-linux-gnu/gcc/i686-linux-gnu/4.5.2/cc1plus -fpreprocessed asn.ii -march=prescott --param l1-cache-size=16 --param l1-cache-line-size=64 --param l2-cache-size=1024 -mtune=prescott -quiet -dumpbase asn.cpp -auxbase asn -g -O2 -version -fstack-protector -o asn.s
GNU C++ (Ubuntu/Linaro 4.5.2-8ubuntu4) version 4.5.2 (i686-linux-gnu)
compiled by GNU C version 4.5.2, GMP version 4.3.2, MPFR version 3.0.0-p8, MPC version 0.9
GGC heuristics: --param ggc-min-expand=100 --param ggc-min-heapsize=131072
GNU C++ (Ubuntu/Linaro 4.5.2-8ubuntu4) version 4.5.2 (i686-linux-gnu)
compiled by GNU C version 4.5.2, GMP version 4.3.2, MPFR version 3.0.0-p8, MPC version 0.9
GGC heuristics: --param ggc-min-expand=100 --param ggc-min-heapsize=131072
Compiler executable checksum: 0c5cb630517b5952f4898dfa56d7e8e5
asn.cpp: In member function ‘void CryptoPP::OID::DEREncode(CryptoPP::BufferedTransformation&) const’:
asn.cpp:254:1: error: unrecognizable insn:
(insn 191 175 192 2 asn.cpp:248 (set (reg:SI 2 cx)
(mem:QI (plus:SI (reg/f:SI 1 dx [orig:60 D.44160 ] [60])
(const_int 4 [0x4])) [16 S1 A32])) -1 (nil))
asn.cpp:254:1: internal compiler error: in extract_insn, at recog.c:2104
Please submit a full bug report,
with preprocessed source if appropriate.
See <file:///usr/share/doc/gcc-4.5/README.Bugs> for instructions.
jeffrey at bruno:~/Desktop/cryptopp$
Reply at: https://bugs.launchpad.net/gcc/+bug/807156/comments/10
------------------------------------------------------------------------
On 2011-07-08T09:42:59+00:00 Ubizjak wrote:
The included source compiles OK for me with:
~/gcc-build/gcc/cc1plus -quiet -O2 -m32 -g -fstack-protector
-march=prescott -mtune=prescott --param l1-cache-size=16 --param l1
-cache-line-size=64 --param l2-cache-size=1024 asn.ii
Tried with:
GNU C++ (GCC) version 4.5.4 20110525 (prerelease)
GNU C++ (GCC) version 4.6.1 20110611 (prerelease)
GNU C++ (GCC) version 4.7.0 20110707 (experimental)
The bug is either fixed or local to:
g++ (Ubuntu/Linaro 4.5.2-8ubuntu4) 4.5.2
Please try to reproduce the bug with latest FSF compiler. Alternatively,
please report the bug to Ubuntu.
Reply at: https://bugs.launchpad.net/gcc/+bug/807156/comments/12
------------------------------------------------------------------------
On 2011-07-08T09:51:21+00:00 Jeffrey Walton wrote:
(In reply to comment #8)
> The included source compiles OK for me with:
>
> ~/gcc-build/gcc/cc1plus -quiet -O2 -m32 -g -fstack-protector -march=prescott
> -mtune=prescott --param l1-cache-size=16 --param l1-cache-line-size=64 --param
> l2-cache-size=1024 asn.ii
>
> Tried with:
> GNU C++ (GCC) version 4.5.4 20110525 (prerelease)
> GNU C++ (GCC) version 4.6.1 20110611 (prerelease)
> GNU C++ (GCC) version 4.7.0 20110707 (experimental)
Interesting. If it matters, the hardware is a Dell GX280.
> The bug is either fixed or local to:
>
> g++ (Ubuntu/Linaro 4.5.2-8ubuntu4) 4.5.2
>
> Please try to reproduce the bug with latest FSF compiler. Alternatively, please
> report the bug to Ubuntu.
OK, thanks. The folks at Ubuntu are aware: https://bugs.launchpad.net/ubuntu/+source/gcc-4.5/+bug/807156.
Thanks for the quick response and help.
Reply at: https://bugs.launchpad.net/gcc/+bug/807156/comments/13
------------------------------------------------------------------------
On 2011-07-09T03:32:20+00:00 Jeffrey Walton wrote:
(In reply to comment #8)
> The included source compiles OK for me with:
>
> ~/gcc-build/gcc/cc1plus -quiet -O2 -m32 -g -fstack-protector -march=prescott
> -mtune=prescott --param l1-cache-size=16 --param l1-cache-line-size=64 --param
> l2-cache-size=1024 asn.ii
>
> Tried with:
> GNU C++ (GCC) version 4.5.4 20110525 (prerelease)
> GNU C++ (GCC) version 4.6.1 20110611 (prerelease)
> GNU C++ (GCC) version 4.7.0 20110707 (experimental)
>
> The bug is either fixed or local to:
>
> g++ (Ubuntu/Linaro 4.5.2-8ubuntu4) 4.5.2
>
> Please try to reproduce the bug with latest FSF compiler. Alternatively, please
> report the bug to Ubuntu.
I just tried using Fedora 15, which offers GCC 4.6 - OK.
Jeff
[jeffrey at studio cryptopp]$ gcc --version
gcc (GCC) 4.6.0 20110530 (Red Hat 4.6.0-9)
Copyright (C) 2011 Free Software Foundation, Inc.
This is free software; see the source for copying conditions. There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
[jeffrey at studio cryptopp]$ make
g++ -DNDEBUG -g -O2 -march=native -pipe -c cryptlib_bds.cpp
g++ -DNDEBUG -g -O2 -march=native -pipe -c hmac.cpp
g++ -DNDEBUG -g -O2 -march=native -pipe -c hex.cpp
g++ -DNDEBUG -g -O2 -march=native -pipe -c esign.cpp
...
g++ -DNDEBUG -g -O2 -march=native -pipe -c asn.cpp
g++ -DNDEBUG -g -O2 -march=native -pipe -c rw.cpp
g++ -DNDEBUG -g -O2 -march=native -pipe -c cast.cpp
g++ -DNDEBUG -g -O2 -march=native -pipe -c tiger.cpp
...
Reply at: https://bugs.launchpad.net/gcc/+bug/807156/comments/15
** Changed in: gcc
Status: Unknown => New
** Changed in: gcc
Importance: Unknown => Medium
** Bug watch added: gcc.gnu.org/ #
http://gcc.gnu.org/bugs/
--
You received this bug notification because you are a member of Ubuntu
Foundations Bugs, which is subscribed to gcc-4.5 in Ubuntu.
https://bugs.launchpad.net/bugs/807156
Title:
GCC (g++):internal compiler error: in extract_insn, at recog.c:2104
Status in The GNU Compiler Collection:
New
Status in Linaro GCC:
Triaged
Status in Linaro GCC 4.5 series:
Triaged
Status in “gcc-4.5” package in Ubuntu:
Incomplete
Bug description:
I was attempting to compile the latest Crypto++ (svn checkout
https://cryptopp.svn.sourceforge.net/svnroot/cryptopp/trunk/c5 cryptopp) on a
Dell GX280 (32 bit Pentium 4). Here's the internal compiler error:
$ make
g++ -DNDEBUG -g -O2 -march=native -pipe -c 3way.cpp
g++ -DNDEBUG -g -O2 -march=native -pipe -c adler32.cpp
g++ -DNDEBUG -g -O2 -march=native -pipe -c algebra.cpp
g++ -DNDEBUG -g -O2 -march=native -pipe -c algparam.cpp
g++ -DNDEBUG -g -O2 -march=native -pipe -c arc4.cpp
g++ -DNDEBUG -g -O2 -march=native -pipe -c asn.cpp
asn.cpp: In member function ‘void
CryptoPP::OID::DEREncode(CryptoPP::BufferedTransformation&) const’:
asn.cpp:254:1: error: unrecognizable insn:
(insn 194 178 195 2 asn.cpp:248 (set (reg:SI 2 cx)
(mem:QI (plus:SI (reg/f:SI 1 dx [orig:61 D.44160 ] [61])
(const_int 4 [0x4])) [16 S1 A32])) -1 (nil))
asn.cpp:254:1: internal compiler error: in extract_insn, at recog.c:2104
Please submit a full bug report,
with preprocessed source if appropriate.
See <file:///usr/share/doc/gcc-4.5/README.Bugs> for instructions.
make: *** [asn.o] Error 1
===================================================================
$ g++ --version
g++ (Ubuntu/Linaro 4.5.2-8ubuntu4) 4.5.2
Copyright (C) 2010 Free Software Foundation, Inc.
This is free software; see the source for copying conditions. There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
$ uname -a
Linux bruno 2.6.38-8-generic #42-Ubuntu SMP Mon Apr 11 03:31:50 UTC 2011 i686
i686 i386 GNU/Linux
jeffrey at bruno:~/Desktop/order-status$
===================================================================
Also reported to GCC at
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=49670.
To manage notifications about this bug go to:
https://bugs.launchpad.net/gcc/+bug/807156/+subscriptions
More information about the foundations-bugs
mailing list