c++/2545: internal error--unrecognizable insn

paul@parasoft.com paul@parasoft.com
Thu Apr 12 18:56:00 GMT 2001

>Number:         2545
>Category:       c++
>Synopsis:       internal error--unrecognizable insn
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    unassigned
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Thu Apr 12 18:56:01 PDT 2001
>Originator:     paul@parasoft.com
>Release:        gcc-2.95.2 and gcc-2.95.3
aix 4.3, 64-bit compile
Test case compiles fine with
-g or -O2 through -O6, fails with -O:

g++ -maix64  yy.cc -c -O1 -v
Reading specs from /usr/local/gcc-2.95.3/lib/gcc-lib/rs6000-ibm-aix4.3.2.0/2.95.3/specs
gcc version 2.95.3 20010315 (release)
 /usr/local/gcc-2.95.3/lib/gcc-lib/rs6000-ibm-aix4.3.2.0/2.95.3/cpp0 -lang-c++ -v -D__GNUC__=2 -D__GNUG__=2 -D__GNUC_MINOR__=95 -D__cplusplus -D_IBMR2 -D_POWER -D_AIX -D_AIX32 -D_AIX41 -D_AIX43 -D_LONG_LONG -D_IBMR2 -D_POWER -D_AIX -D_AIX32 -D_AIX41 -D_AIX43 -D_LONG_LONG -Asystem(unix) -Asystem(aix) -D__EXCEPTIONS -D__CHAR_UNSIGNED__ -D__OPTIMIZE__ -D__64BIT__ -D_ARCH_PPC yy.cc /home/aix4/development/devtest/tmp/ccaLm2xC.ii
GNU CPP version 2.95.3 20010315 (release)
#include "..." search starts here:
#include <...> search starts here:
End of search list.
The following default directories have been omitted from the search path:
End of omitted list.
 /usr/local/gcc-2.95.3/lib/gcc-lib/rs6000-ibm-aix4.3.2.0/2.95.3/cc1plus /home/aix4/development/devtest/tmp/ccaLm2xC.ii -quiet -dumpbase yy.cc -maix64 -O1 -version -o /home/aix4/development/devtest/tmp/cca4dIQ7.s
GNU C++ version 2.95.3 20010315 (release) (rs6000-ibm-aix4.3.2.0) compiled by GNU C version 2.95.3 20010315 (release).
yy.cc: In function `int func0(XXX_node *, TList *, bool)':
yy.cc:42: internal error--unrecognizable insn:
(insn 387 386 133 (set (reg:DI 11 r11)
        (mem/u:DI (symbol_ref/u:DI ("*LC..1")) 0)) -1 (nil)
g++ -maix64  yy.cc -c -O1

Content-Type: text/plain; name="yy.cc"
Content-Disposition: inline; filename="yy.cc"

typedef long unsigned int size_t;

union XXX_node;
typedef XXX_node *PTR;

class   TList {
    TList(PTR, int, TList*);

struct XXX_u1 {
	PTR _field1;
	PTR _field2;
	PTR _field5;
	int attr_3:1; /* delete this, the bug disappears */
	int attr_4:1;
union XXX_node
    XXX_u1 u1;
    XXX_u1 u4;
int func2(PTR, PTR);
static int func0(PTR type, TList * u, bool _private)
    PTR base, scan, tt;
    TList * elm;

    elm = new TList(type, 0, u);

    for (scan = type->u4._field1; scan; scan = scan->u1._field2) {
        if (scan->u1.attr_4)
        if (!func2(type, scan->u1._field5)) {
            if (func0(scan->u1._field5, elm, _private)) {
                delete elm;
                return 1;
    return 0;

More information about the Gcc-bugs mailing list