public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c/60435] New: GCC failes to apply CSE for va_arg with different types whose representations match
@ 2014-03-05 23:22 bugdal at aerifal dot cx
2014-03-06 9:53 ` [Bug middle-end/60435] " rguenth at gcc dot gnu.org
0 siblings, 1 reply; 2+ messages in thread
From: bugdal at aerifal dot cx @ 2014-03-05 23:22 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=60435
Bug ID: 60435
Summary: GCC failes to apply CSE for va_arg with different
types whose representations match
Product: gcc
Version: unknown
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: c
Assignee: unassigned at gcc dot gnu.org
Reporter: bugdal at aerifal dot cx
Consider code of the following form:
long foo;
switch (cmd) {
case CMD1:
case CMD2:
case CMD3:
/* ... */
case CMD99:
foo = va_arg(ap, int);
break;
default:
foo = va_arg(ap, long);
break;
}
On machines where int and long have the same representation (even if just in
calling convention, not in memory), this whole switch should be eliminated. GCC
fails to do so, possibly resulting in large amounts of useless branch code.
^ permalink raw reply [flat|nested] 2+ messages in thread
* [Bug middle-end/60435] GCC failes to apply CSE for va_arg with different types whose representations match
2014-03-05 23:22 [Bug c/60435] New: GCC failes to apply CSE for va_arg with different types whose representations match bugdal at aerifal dot cx
@ 2014-03-06 9:53 ` rguenth at gcc dot gnu.org
0 siblings, 0 replies; 2+ messages in thread
From: rguenth at gcc dot gnu.org @ 2014-03-06 9:53 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=60435
--- Comment #1 from Richard Biener <rguenth at gcc dot gnu.org> ---
Can't verify it as there isn't a compilable testcase. But I guess this is
just because GCC doesn't have a code hoisting pass, not because of
int vs. long. See PR23286 of which this is a duplicate I think.
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2014-03-06 9:53 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-03-05 23:22 [Bug c/60435] New: GCC failes to apply CSE for va_arg with different types whose representations match bugdal at aerifal dot cx
2014-03-06 9:53 ` [Bug middle-end/60435] " rguenth at gcc dot gnu.org
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).