Bug 33332

Summary: [4.3 Regression] unrecognizable insn on hppa
Product: gcc Reporter: Martin Michlmayr <tbm>
Component: targetAssignee: Not yet assigned to anyone <unassigned>
Status: RESOLVED DUPLICATE    
Severity: normal CC: danglin, debian-gcc, gcc-bugs, jakub, pinskia, sandra, tbm
Priority: P3    
Version: 4.3.0   
Target Milestone: ---   
Host: Target: hppa-linux-gnu
Build: Known to work:
Known to fail: Last reconfirmed:
Attachments: preprocessed source

Description Martin Michlmayr 2007-09-07 14:10:28 UTC
[ Forwarded from http://bugs.debian.org/440378 ]

Frank Lichtenheld reported the following bug in gcc from trunk while compiling the Linux kernel:

tbm@meitner:~$ /usr/lib/gcc-snapshot/bin/gcc -c -O mxb.i
drivers/media/video/mxb.c: In function 'mxb_ioctl':
drivers/media/video/mxb.c:925: error: unrecognizable insn:
(insn 148 147 149 30 drivers/media/video/mxb.c:545 (parallel [
            (set (mem/s:QI (reg:SI 215) [0 S1 A32])
                (const_int 0 [0x0]))
            (clobber (reg:SI 216))
            (clobber (reg:SI 217))
            (use (const_int 24 [0x18]))
            (use (const_int 4 [0x4]))
        ]) -1 (nil))
drivers/media/video/mxb.c:925: internal compiler error: in extract_insn, at recog.c:1990
Please submit a full bug report,
with preprocessed source if appropriate.

This happens at least with GCC from trunk from 20070829 and 20070902.
Comment 1 Martin Michlmayr 2007-09-07 14:11:07 UTC
Created attachment 14168 [details]
preprocessed source
Comment 2 Martin Michlmayr 2007-09-07 14:11:50 UTC
Here's a smaller testcase:

tbm@meitner:~$ /usr/lib/gcc-snapshot/bin/gcc -c -O mxb.c
mxb.c: In function 'mxb_probe':
mxb.c:30: error: unrecognizable insn:
(insn 10 9 11 3 mxb.c:29 (parallel [
            (set (mem/s/j/c:QI (reg:SI 98) [0 D.1580.name+8 S1 A64])
                (const_int 0 [0x0]))
            (clobber (reg:SI 99))
            (clobber (reg:SI 100))
            (use (const_int 40 [0x28]))
            (use (const_int 8 [0x8]))
        ]) -1 (nil))
mxb.c:30: internal compiler error: in extract_insn, at recog.c:1990
Please submit a full bug report,


Testcase:

struct pci_device_id {
  unsigned long driver_data;
};

extern struct module __this_module;
  struct i2c_adapter {
  char name[48];
};

struct saa7146_dev;
struct saa7146_pci_extension_data {
  struct saa7146_extension *ext;
  void *ext_priv;
};
struct saa7146_extension {
 int (*probe)(struct saa7146_dev *);
}
input_port_selection[4] = {
    0x00, 0x00
};
struct mxb {
  struct i2c_adapter i2c_adapter;
};
static struct saa7146_extension extension;
static int mxb_probe(struct saa7146_dev* dev) {
  struct mxb* mxb = ((void *)0);
  mxb->i2c_adapter = (struct i2c_adapter) {
    .name = "mxb",
  };
}
static struct saa7146_pci_extension_data mxb = {
  .ext = &extension,
};
static struct pci_device_id pci_tbl[] = {
  {
    .driver_data = (unsigned long)&mxb,
  }
};
extern struct pci_device_id __mod_pci_device_table __attribute__ ((unused, alias("pci_tbl")));
static struct saa7146_extension extension = {
 .probe = mxb_probe,
};

Comment 3 John David Anglin 2007-09-07 14:55:18 UTC

*** This bug has been marked as a duplicate of 33273 ***