[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Bug#633479: ICE: gcc-4.6: ICE on armhf with oss4-4.2-build2004-1



Package: gcc-4.6
Version: 4.6.1-2
Severity: important

Hi,

gcc fails with an ICE on package oss4 on armhf:

http://buildd.debian-ports.org/status/fetch.php?pkg=oss4&arch=armhf&ver=4.2-build2004-1&stamp=1310086627

Attached is the smallest trimmed down file that is able to reproduce the ICE:

$ gcc-4.6 -O ossplay_decode_pre.new.c -c -o ossplay_decode_pre.o
ossplay_decode_pre.new.c: In function ‘decode_amplify’:
ossplay_decode_pre.new.c:148:1: internal compiler error: in
get_arm_condition_code, at config/arm/arm.c:17152
Please submit a full bug report,
with preprocessed source if appropriate.
See <file:///usr/share/doc/gcc-4.6/README.Bugs> for instructions.

Regards

Konstantinos
__extension__ typedef int __ssize_t;
__extension__ typedef int __intptr_t;

typedef __ssize_t ssize_t;

typedef int int16_t __attribute__ ((__mode__ (__HI__)));
typedef int int32_t __attribute__ ((__mode__ (__SI__)));
typedef int int64_t __attribute__ ((__mode__ (__DI__)));


typedef unsigned int u_int16_t __attribute__ ((__mode__ (__HI__)));
typedef unsigned int u_int32_t __attribute__ ((__mode__ (__SI__)));
typedef unsigned int u_int64_t __attribute__ ((__mode__ (__DI__)));

typedef long long sbig_t;
typedef unsigned long long big_t;
__extension__

typedef int16_t int16;
typedef int32_t int32;
typedef __intptr_t intptr_t;
typedef intptr_t intptr;

typedef struct {
  int fd;
  int format;
  int channels;
  int speed;
  int flags;
  int reclevel;
  char dname[32];
  char current_songname[64];
  char * recsrc;
  char * playtgt;
}
dspdev_t;

typedef enum errors_t {
  E_OK,
  E_SETUP_ERROR,
  E_FORMAT_UNSUPPORTED,
  E_CHANNELS_UNSUPPORTED,
  E_DECODE,
  E_ENCODE,
  E_USAGE,
  SEEK_CONT_AFTER_DECODE
}
errors_t;

typedef enum fctypes_t {
  RAW_FILE,
  WAVE_FILE,
  AU_FILE,
  AIFF_FILE,
  AIFC_FILE,
  WAVE_FILE_BE,
  _8SVX_FILE,
  _16SV_FILE,
  MAUD_FILE,
  OGG_FILE
}
fctypes_t;

typedef ssize_t (decfunc_t) (unsigned char **, unsigned char *, ssize_t,
                             void *);
typedef enum decoder_flag_t {
  FREE_NONE = 0,
  FREE_OBUF = 1,
  FREE_META = 2
}
decoder_flag_t;

typedef struct decoders_queue {
  struct decoders_queue * next;
  decfunc_t * decoder;
  unsigned char * outbuf;
  void * metadata;
  decoder_flag_t flag;
}
decoders_queue_t;

errors_t encode_sound (dspdev_t *, fctypes_t, const char *, int, int, int,
                       big_t);
extern int amplification;
static decfunc_t decode_amplify;
static decfunc_t decode_nul;






errors_t
encode_sound (dspdev_t * dsp, fctypes_t type, const char * fname, int format,
              int channels, int speed, big_t datalimit)
{
  decoders_queue_t * dec, * decoders = ((void *)0);
  errors_t ret;

  decoders->decoder = decode_amplify;

  return ret;
}
static ssize_t
decode_amplify (unsigned char ** obuf, unsigned char * buf,
                ssize_t l, void * metadata)
{
  int format = (int)(intptr)metadata;
  ssize_t i, len;

  switch (format)
    {
      case 0x00000010:
        {
          int16 *s = (int16 *)buf;
          int32 tmp;

          len = l / 2;
          for (i = 0; i < len ; i++)
            {
              tmp = (int32)s[i] * amplification / 100;
              if (tmp > 32767) s[i] = 32767;
              else if (tmp < (-32767 - 1)) s[i] = (-32767 - 1);
              else s[i] = tmp;
            }
        }
        break;
      case 0x00001000:
      case 0x00008000:
        {
          int32 *s = (int32 *)buf;
          sbig_t tmp;

          len = l / 4;
          for (i = 0; i < len; i++)
            {
              tmp = (sbig_t)s[i] * amplification / 100;
              if (tmp > (2147483647)) s[i] = (2147483647);
              else if (tmp < (-2147483647-1)) s[i] = (-2147483647-1);
              else s[i] = tmp;
            }
        }
       break;
   }

  *obuf = buf;
  return l;
}


Reply to: