Internal compiler error in function fatal_insn

Mark Hahn hahn@coffee.psychology.mcmaster.ca
Tue Nov 3 09:39:00 GMT 1998


this bug requires the 19981101 snapshot, -O -fomit-frame-pointer.
the bug apparently depends on the repetition of the constant (.1),
though its value doesn't matter, as well as *, + and the two data members.  
doubles work as well; int doesn't.  this is a linux 2.1.pre3-127 system 
with 2.7.2.3 as the host cc.  doesn't matter whether I use Haifa or not.
this bug doesn't appear in the 19981012 snapshot; I didn't try 1028.

$ cat b.C
class pair {
  public:

    friend pair operator+ (const pair& a, const pair& b) {
        return pair();
    }
    friend pair operator* (const float factor, const pair& a) {
        return pair(a.a*factor, a.b*factor);
    }
    float a,b;

    pair() {}
    pair(float _a, float _b) {}
};

void
bogus() {
    pair x;
    (.1 * x) + (.1 * x);
}

$ /usr/local/bin/gcc -v --save-temps -O -fomit-frame-pointer
b.C
Reading specs from
/usr/local/lib/gcc-lib/i586-pc-linux-gnu/egcs-2.92.18/specs
gcc version egcs-2.92.18 19981101 (gcc2 ss-980609 experimental)
 /usr/local/lib/gcc-lib/i586-pc-linux-gnu/egcs-2.92.18/cpp -lang-c++ -v
-undef -D__GNUC__=2 -D__GNUG__=2 -D__cplusplus -D__GNUC_MINOR__=92 -D__ELF__ 
-Dunix -D__i386__ -Dlinux -D__ELF__ -D__unix__ -D__i386__ -D__linux__
-D__unix -D__linux -Asystem(posix) -D__EXCEPTIONS -D__OPTIMIZE__ -Acpu(i386)
-Amachine(i386) -Di386 -D__i386 -D__i386__ -Di586 -Dpentium -D__i586
-D__i586__ -D__pentium -D__pentium_
_ b.C b.ii
GNU CPP version egcs-2.92.18 19981101 (gcc2 ss-980609 experimental) (i386
Linux/
ELF)
#include "..." search starts here:
#include <...> search starts here:
 /usr/local/include/g++-2
 /usr/local/include
 /usr/local/i586-pc-linux-gnu/include
 /usr/local/lib/gcc-lib/i586-pc-linux-gnu/egcs-2.92.18/include
 /usr/include
End of search list.
 /usr/local/lib/gcc-lib/i586-pc-linux-gnu/egcs-2.92.18/cc1plus b.ii -quiet
-dump
base b.cc -O -version -fomit-frame-pointer -o b.s
GNU C++ version egcs-2.92.18 19981101 (gcc2 ss-980609 experimental)
(i586-pc-lin
ux-gnu) compiled by GNU C version 2.7.2.3.
b.C: In function `void bogus()':
b.C:20: internal error--insn does not satisfy its constraints:
(insn/i 32 108 33 (set (reg:SF 8 %st(0))
        (mult:SF (reg:SF 8 %st(0))
            (const_double:SF (mem/u:SF (symbol_ref/u:SI ("*.LC0")) 0) 0
-8556380
16 1073466572))) 347 {strlensi-3} (nil)
    (nil))
toplev.c:1388: Internal compiler error in function fatal_insn




More information about the Gcc-bugs mailing list