[Bug middle-end/63556] New: gcc should dedup string postfixes
andi-gcc at firstfloor dot org
gcc-bugzilla@gcc.gnu.org
Thu Oct 16 08:53:00 GMT 2014
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=63556
Bug ID: 63556
Summary: gcc should dedup string postfixes
Product: gcc
Version: 4.9.2
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: middle-end
Assignee: unassigned at gcc dot gnu.org
Reporter: andi-gcc at firstfloor dot org
With this code:
extern void func(char *a, char *b);
void f(void)
{
func("abc", "xabc");
func("abc", "abc");
}
we get:
.LC0:
.string "xabc"
.LC1:
.string "abc"
So the "abc"s get deduped. But it could also dedup the postfix by pointing
"abc" to "xabc" + 1. This would save some space.
More information about the Gcc-bugs
mailing list