This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug middle-end/52074] ICE: RTL flag check: MEM_VOLATILE_P used with unexpected rtx code 'plus' in extract_fixed_bit_field, at expmed.c:1734
- From: "jakub at gcc dot gnu.org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Wed, 01 Feb 2012 11:47:00 +0000
- Subject: [Bug middle-end/52074] ICE: RTL flag check: MEM_VOLATILE_P used with unexpected rtx code 'plus' in extract_fixed_bit_field, at expmed.c:1734
- Auto-submitted: auto-generated
- References: <bug-52074-4@http.gcc.gnu.org/bugzilla/>
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=52074
Jakub Jelinek <jakub at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |jakub at gcc dot gnu.org
--- Comment #2 from Jakub Jelinek <jakub at gcc dot gnu.org> 2012-02-01 11:47:00 UTC ---
C testcase (-m64 -O2):
struct S { const char *d, *e; } __attribute__((packed));
void
foo (const char **p, struct S *q)
{
*p = "abcdef";
q->d = "ghijk";
}
I'd say the bug is in the section anchor support (and the bug goes away with
-O2 -fno-section-anchors; so I'd expect this is a regression since
-fsection-anchors has been introduced and made default on ppc64), because
expand_normal on ADDR_EXPR of the STRING_CST returns a PLUS (which IMHO should
be ok only for EXPAND_SUM etc. but not EXPAND_NORMAL).