[Bug c++/23482] New: g++ crash building for m5307 arch

keith dot nicewarner at spacedev dot com gcc-bugzilla@gcc.gnu.org
Fri Aug 19 16:20:00 GMT 2005


I reported this to the uClinux developer list (where I got my gcc cross-compiler
toolchain), and they recommended that I report it here.

I'm getting a compiler crash building a 3rd-party C++ lib (ACE) for uClinux. 
The lib compiles with g++ for every other platform known to man, so I'm sure the
code is solid.  I was able to whittle down the offending code to the following:

---
class A
{
public:
  void foo();
};

class B
{
public:
  ~B();
};

void bar(A & a)
{
  B b;
  a.foo();
  char c[32768];
}
---

DonÂ’t ask me why, but each statement is required to produce the crash.  When I
compile it with 3.4.3 (the 20050221 uClinux m68k toolchain distribution), I get
this:

% m68k-elf-g++ gcc-crash.cpp -m5307 -c
gcc-crash.cpp: In function `void bar(A&)':
gcc-crash.cpp:19: error: insn does not satisfy its constraints:
(insn 24 106 107 (set (mem:SI (plus:SI (reg/f:SI 14 %a6)
                (reg:SI 0 %d0)) [0 S4 A16])
        (mem:SI (plus:SI (reg/f:SI 14 %a6)
                (reg:SI 1 %d1)) [0 S4 A16])) 26 {*m68k.md:760} (nil)
    (nil))
gcc-crash.cpp:19: internal compiler error: in final_scan_insn, at final.c:2359
Please submit a full bug report,
with preprocessed source if appropriate.
See <URL:http://gcc.gnu.org/bugs.html> for instructions.
 
Here are the details from the compiler:
% m68k-elf-g++ -v
Reading specs from /usr/local/m68k-uclinux-tools/lib/gcc/m68k-uclinux/3.4.3/specs
Configured with: /usr/local/src/uclinux-tools/gcc-3.4.3/configure
--target=m68k-uclinux --prefix=/usr/local/m68k-uclinux-tools
--enable-languages=c,c++ --enable-multilib --enable-target-optspace
--with-gnu-ld --disable-nls --disable-__cxa_atexit --disable-c99
--disable-clocale --disable-c-mbchar --disable-long-long --disable-checking
--enable-threads=posix --disable-libstdcxx-pch
--enable-cxx-flags=-D_ISOC99_SOURCE -D_BSD_SOURCE
Thread model: posix
gcc version 3.4.3

BTW, this code compiles fine with the 2.95.3 uClinux m68k toolchain, but I need
to upgrade to 3.4.x.

Thanks,
Keith.

-- 
           Summary: g++ crash building for m5307 arch
           Product: gcc
           Version: 3.4.3
            Status: UNCONFIRMED
          Severity: normal
          Priority: P2
         Component: c++
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: keith dot nicewarner at spacedev dot com
                CC: gcc-bugs at gcc dot gnu dot org
  GCC host triplet: i386-redhat-linux
GCC target triplet: m68k-uclinux


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



More information about the Gcc-bugs mailing list