https://gcc.gnu.org/bugzilla/show_bug.cgi?id=78148
Bug ID: 78148
Summary: [7 Regression] r241649 causes -fcompare-debug failure
on ppc64le
Product: gcc
Version: 7.0
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: target
Assignee: unassigned at gcc dot gnu.org
Reporter: trippels at gcc dot gnu.org
CC: ktkachov at gcc dot gnu.org, segher at gcc dot gnu.org
Target Milestone: ---
Host: powerpc64le-unknown-linux-gnu
Target: powerpc64le-unknown-linux-gnu
Build: powerpc64le-unknown-linux-gnu
Since r241649:
commit 3d3e04acc6a8f7545d2c589319162967fb7f763a
Author: ktkachov <ktkachov@138bc75d-0d04-0410-961f-82ee72b054a4>
Date: Fri Oct 28 14:18:50 2016 +0000
GIMPLE store merging pass
I get a -fcompare-debug failure when building the Linux kernel on ppc64le.
trippels@gcc2-power8 linux % cat ipmi_msghandler.i
struct ipmi_system_interface_addr {
int addr_type;
int channel;
};
struct kernel_ipmi_msg {
char netfn;
char cmd;
};
extern void fn2(struct ipmi_system_interface_addr, struct kernel_ipmi_msg);
typedef struct ipmi_smi *ipmi_smi_t;
struct ipmi_channel {
char medium;
char protocol;
} a;
ipmi_smi_t e;
struct ipmi_smi {
int curr_channel;
struct ipmi_channel channels[];
} fn1() {
int b;
struct kernel_ipmi_msg c;
struct ipmi_system_interface_addr d;
d.channel = c.netfn = c.cmd = 0;
fn2(d, c);
}
void fn3() {
e->channels[0].medium = e->channels[0].protocol = 0;
fn1();
}
trippels@gcc2-power8 linux % gcc -fcompare-debug -mno-altivec -mno-vsx -O2 -c
ipmi_msghandler.i
gcc: error: ipmi_msghandler.i: -fcompare-debug failure (length)
--- ipmi_msghandler.gkd 2016-10-28 17:17:23.537929840 +0000
+++ ipmi_msghandler.gk.gkd 2016-10-28 17:17:23.587931015 +0000
@@ -142,7 +142,7 @@
(mem/f/c:DI (reg/f:DI 9 9 [158]) [ e+0 S8 A64]))
"ipmi_msghandler.i":27# {*movdi_internal64}
(nil))
(insn # 0 0 (set (mem:HI (plus:DI (reg/f:DI 9 9 [orig:155 e.0_1 ] [155])
- (const_int 4 [0x4])) [ MEM[(char *)e.0_1 + 4B]+0 S2 A8])
+ (const_int 4 [0x4])) [ MEM[(char *)e.0_1 + 4B]+0 S2 A32])
(reg:HI 10 10 [159])) "ipmi_msghandler.i":27# {*movhi_internal}
(expr_list:REG_DEAD (reg:HI 10 10 [159])
(expr_list:REG_DEAD (reg/f:DI 9 9 [orig:155 e.0_1 ] [155])