This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
c++/4013: g++ 3.0 compilation failure with -mlong-calls and -mthumb
- To: gcc-gnats at gcc dot gnu dot org
- Subject: c++/4013: g++ 3.0 compilation failure with -mlong-calls and -mthumb
- From: andy dot parker at oxsemi dot com
- Date: 13 Aug 2001 11:01:35 -0000
- Reply-To: andy dot parker at oxsemi dot com
>Number: 4013
>Category: c++
>Synopsis: g++ 3.0 compilation failure with -mlong-calls and -mthumb
>Confidential: no
>Severity: serious
>Priority: medium
>Responsible: unassigned
>State: open
>Class: rejects-legal
>Submitter-Id: net
>Arrival-Date: Mon Aug 13 04:06:01 PDT 2001
>Closed-Date:
>Last-Modified:
>Originator: Andy Parker
>Release: g++ 3.0
>Organization:
>Environment:
Host: Linux mars 2.2.19-7.0.8 #1 Thu Jun 21 06:28:56 EDT 2001 i686 unknown
Target: arm-elf
Configured with: /files/parker/src/gcc/gcc-3.0/configure --target=arm-elf --pref
ix=/files/parker/tools --exec-prefix=/files/parker/tools/H-i686-pc-linux --with-
gnu-as --with-gnu-ld --enable-sjlj-exceptions --with-newlib--disable-shared -v
Thread model: single
gcc version 3.0
>Description:
g++ 3.0 fails to compile some c++ components. An example is given below. Both the -mlong-calls and -mthumb switches are specified to the compiler.
>How-To-Repeat:
Source:
class myClass {
public:
myClass(){mInt = 0;}
~myClass(){}
int GetInt();
private:
int mInt;
};
int myClass::GetInt(){return mInt;}
int cFunc(){
myClass c1;
return c1.GetInt();
}
Compiler command and output:
bash-2.04$ arm-elf-g++ -mthumb -mlong-calls -Wall -c test.cxx
test.cxx: In function `int cFunc()':
test.cxx:17: Unrecognizable insn:
(call_insn 32 31 34 (parallel[
(set (reg:SI 0 r0)
(call (mem:SI (symbol_ref:SI ("^_ZN7myClass6GetIntEv")) 0)
(const_int 0 [0x0])))
(use (const_int 1 [0x1]))
(clobber (reg:SI 14 lr))
] ) -1 (nil)
(expr_list:REG_UNUSED (reg:SI 14 lr)
(expr_list:REG_EH_REGION (const_int 0 [0x0])
(nil)))
(expr_list (use (reg:SI 0 r0))
(nil)))
test.cxx:17: Internal compiler error in extract_insn, at recog.c:2210
Please submit a full bug report,
with preprocessed source if appropriate.
See <URL:http://www.gnu.org/software/gcc/bugs.html> for instructions.
>Fix:
One possible work around I've discovered is to inline class operations.
>Release-Note:
>Audit-Trail:
>Unformatted: