# gcc -v
Using built-in specs.
Target: x86_64-unknown-linux-gnu
Configured with: ../gcc-4.3.3/configure --prefix=/tmp/gcc433
--enable-languages=c,c++
Thread model: posix
gcc version 4.3.3 (GCC)

with the following, self-contained file buc.c

#define lit_from_int(in) ((in<0)?(((-in)<<1)|1):(in<<1))
void init_clause(int* literals,int size, int *lits)
{
  int i;
  for(i=0; i < size; i++) {
    lits[i] = lit_from_int(literals[i]);
  }
}

On a x86_64 host, both gcc 4.3.1 (handmade compilation), gcc 4.3.2 (Fedora Core
10 package) and gcc 4.3.3 (handmade compilation) crash with -O3 optimization

# gcc -O3 -c bug.c 
bug.c: In function ‘init_clause’:
bug.c:10: internal compiler error: in trunc_int_for_mode, at explow.c:55

This bug doesn't occur on a i686 host (gcc 4.3.2). On a x86_64 host, it doesn't
 occur when -O2 is used with gcc 4.3.3 or when gcc 4.2.4 is used.


-- 
           Summary: internal compiler error: in trunc_int_for_mode, at
                    explow.c:55
           Product: gcc
           Version: 4.3.3
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: c
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: olivier dot roussel at cril dot univ-artois dot fr
 GCC build triplet: x86_64-unknown-linux-gnu
  GCC host triplet: x86_64-unknown-linux-gnu
GCC target triplet: x86_64-unknown-linux-gnu


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

Reply via email to