http://gcc.gnu.org/bugzilla/show_bug.cgi?id=50644
--- Comment #16 from Markus Trippelsdorf <markus at trippelsdorf dot de> 2011-10-29 13:08:13 UTC --- Or as one file: % cat test.i struct _ddebug { const char *modname; const char *function; const char *filename; const char *format; char enabled; } cpumask_t; int native_cpu_up(unsigned int cpu) { int err; static struct _ddebug descriptor = { "", __func__, "", "", 866, 0 }; if (__builtin_expect(!!(descriptor.enabled), 0)) __dynamic_pr_debug(&descriptor, "", err); check_tsc_sync_source(cpu); } struct smp_ops { int (*cpu_up)(unsigned cpu); void (*cpu_die)(unsigned int cpu); }; void native_cpu_die(unsigned int cpu); struct kernel_symbol { unsigned long value; }; struct smp_ops smp_ops = { .cpu_up = native_cpu_up, .cpu_die = native_cpu_die, }; static const struct kernel_symbol __ksymtab_smp_ops __attribute__((__used__)) = { (unsigned long)&smp_ops }; typedef struct { } atomic_t; extern __typeof__(int) cpu_number; static atomic_t start_count; void check_tsc_sync_source(int cpu) { if (unsynchronized_tsc()) return; else { do { static struct _ddebug descriptor = { "", __func__, "", 151, 0 }; if (__builtin_expect(!!(descriptor.enabled), 0)) __dynamic_pr_debug(&descriptor, "", (( { typeof(cpu_number) pfo_ret__; switch (sizeof(cpu_number)) { case 4: asm("mov" "l ""%%""gs"":" "%P" "1"",%0" : "=r" (pfo_ret__) : "m" (cpu_number)); } pfo_ret__; } )), cpu); } while (0); } atomic_set(&start_count, 0); } % gcc test.i -w -O2 -flto In file included from :0:0: test.i: In function ‘native_cpu_up’: test.i:9:5: internal compiler error: Segmentation fault Please submit a full bug report