Compile the below (cut-down) testcase with:
m68k-elf-gcc -c fptest.c -mcpu=5282 -fomit-frame-pointer -O
(gcc 4.3.2) and you will get:
-=-=-=-=-=-
fptest.c: In function ‘do_test’:
fptest.c:21: error: insn does not satisfy its constraints:
(insn 31 114 32 2 fptest.c:11 (set (reg:SI 8 %a0 [62])
        (plus:SI (plus:SI (mult:SI (reg/f:SI 15 %sp)
                    (const_int 4 [0x4]))
                (reg:SI 9 %a1))
            (const_int 128 [0x80]))) 451 {*lea} (nil))
fptest.c:21: internal compiler error: in reload_cse_simplify_operands, at
postreload.c:395
-=-=-=-=-=-

The testcase has been trimmed down such that just about any further change, or
change in the command line args, makes it disappear. An earlier (larger)
version closer to the original code would also fail at -O2 and -O3.

-=-=-=-=-=-=-=-=-=-=-=-
static double fpt3_values[100];
void do_test( void )
{
    int count = 100;
    int loops = 200;
    double *values = fpt3_values;
    unsigned int i, j;
    volatile double sum = 0.0;
    unsigned int seed;

    seed = ((unsigned int)&i)*count;

    for( i = 0; i < count; i++ )
        values[i] = (double)seed;

    for( j = 0; j < loops ; j++ )
    {
        for( i = 0; i < count; i++ )
            sum += (((values[i%count])*(values[(i+1)%count])));
    }
}


-- 
           Summary: M68k/Coldfire ICE with -O: insn does not satisfy its
                    constraints
           Product: gcc
           Version: 4.3.2
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: target
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: jifl-bugzilla at jifvik dot org
 GCC build triplet: i686-pc-linux-gnu
  GCC host triplet: i686-pc-linux-gnu
GCC target triplet: m68k-elf


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

Reply via email to