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

Markus Trippelsdorf <markus at trippelsdorf dot de> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |markus at trippelsdorf dot
                   |                            |de

--- Comment #14 from Markus Trippelsdorf <markus at trippelsdorf dot de> 
2012-05-02 14:51:10 UTC ---
Here is a small testcase:

markus@x4 tmp % cat test.i
typedef __u32;
struct IO_APIC_route_entry {
  __u32:1
}
;
struct syscore_ops {
  int suspend
};
struct {
  struct IO_APIC_route_entry entry
    }
a;
b;
struct IO_APIC_route_entry
ioapic_read_entry () {
  io_apic_read (2 * b);
  return a.entry;
}
save_ioapic_entries () {
  ioapic_read_entry ();
}
print_ICs () {
  ioapic_read_entry ();
}
__initcall_print_ICs7 __attribute__ ((__used__)) = print_ICs;
struct syscore_ops c = {.suspend = save_ioapic_entries };
ioapic_init_ops () {
  register_syscore_ops (&c);
}
__initcall_ioapic_init_ops6 __attribute__ ((__used__)) = ioapic_init_ops;

markus@x4 tmp % gcc -w -flto -m32 -freg-struct-return -c test.i
markus@x4 tmp % gcc -O2 -flto test.o
/usr/lib/gcc/x86_64-pc-linux-gnu/4.7.1/../../../../x86_64-pc-linux-gnu/bin/ld:
error: test.o: incompatible target
In file included from :0:0:
test.i: In function ‘ioapic_read_entry’:
test.i:15:1: internal compiler error: in tree_nrv, at tree-nrv.c:155
Please submit a full bug report,
with preprocessed source if appropriate

gcc-4.6.3 is also affected.

Reply via email to