[Bug c/63344] New: [5 Regression] Linux (makeallyes config) compilation error: error: apic_numachip causes a section type conflict with numachip_system
mliska at suse dot cz
gcc-bugzilla@gcc.gnu.org
Tue Sep 23 14:35:00 GMT 2014
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=63344
Bug ID: 63344
Summary: [5 Regression] Linux (makeallyes config) compilation
error: error: apic_numachip causes a section type
conflict with numachip_system
Product: gcc
Version: 5.0
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: c
Assignee: unassigned at gcc dot gnu.org
Reporter: mliska at suse dot cz
CC: hubicka at ucw dot cz
During testing of latest compiler, I've encountered an error in Linux kernel:
https://git.kernel.org/cgit/linux/kernel/git/next/linux-next.git/tree/arch/x86/kernel/apic/apic_numachip.c?id=refs/tags/next-20140923
arch/x86/kernel/apic/apic_numachip.c:33:12: error: numachip_system causes a
section type conflict with apic_numachip
static int numachip_system __read_mostly;
^
arch/x86/kernel/apic/apic_numachip.c:205:26: note: 'apic_numachip' was declared
here
static const struct apic apic_numachip __refconst = {
There's a testcase reduced by creduce:
$ cat testcase.ii
struct apic {
int *name
} numachip_system __attribute__((__section__(".data..read_mostly")));
static const struct apic apic_numachip
__attribute__((__section__(".data..read_mostly")));
static const struct apic apic_numachip
__attribute__((__section__(""))) = {.name = ""};
$ gcc testcase.i -S
/home/marxin/Programming/testcases/kernel_numa/testcase.i:6:26: error:
apic_numachip causes a section type conflict with numachip_system
The problem started with: r211363
Older gcc produces:
/home/marxin/Programming/testcases/kernel_numa/testcase.i:3:1: warning: no
semicolon at end of struct or union [enabled by default]
} numachip_system __attribute__((__section__(".data..read_mostly")));
^
/home/marxin/Programming/testcases/kernel_numa/testcase.i:7:5: warning:
initialization from incompatible pointer type [enabled by default]
__attribute__((__section__(""))) = {.name = ""};
^
/home/marxin/Programming/testcases/kernel_numa/testcase.i:7:5: warning: (near
initialization for ‘apic_numachip.name’) [enabled by default]
I am not familiar with section attribute magic, but it looks like a regression.
Thank you,
Martin
More information about the Gcc-bugs
mailing list