public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c++/40058] C++ FE generates struct assignments with mismatched sizes
[not found] <bug-40058-4@http.gcc.gnu.org/bugzilla/>
@ 2012-03-21 10:37 ` jamborm at gcc dot gnu.org
0 siblings, 0 replies; 3+ messages in thread
From: jamborm at gcc dot gnu.org @ 2012-03-21 10:37 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=40058
--- Comment #3 from Martin Jambor <jamborm at gcc dot gnu.org> 2012-03-21 10:05:24 UTC ---
If this ever gets fixed, we can remove a test in SRA as in:
http://gcc.gnu.org/ml/gcc-patches/2012-03/msg01356.html
^ permalink raw reply [flat|nested] 3+ messages in thread
* [Bug c++/40058] C++ FE generates struct assignments with mismatched sizes
2009-05-07 10:58 [Bug c++/40058] New: " rguenth at gcc dot gnu dot org
2010-02-10 5:47 ` [Bug c++/40058] " jason at gcc dot gnu dot org
@ 2010-02-10 9:42 ` rguenth at gcc dot gnu dot org
1 sibling, 0 replies; 3+ messages in thread
From: rguenth at gcc dot gnu dot org @ 2010-02-10 9:42 UTC (permalink / raw)
To: gcc-bugs
------- Comment #2 from rguenth at gcc dot gnu dot org 2010-02-10 09:42 -------
We still have these constructs and expand still properly deals with them
(it uses the size of the LHS).
I'm not sure what's the best thing to do about this bug. Eventually better
documenting what sizes in an assignment are really relevant.
The FE now indeed emits memcpy whenever there is not a DECL or FIELD_DECL
on the LHS that specifies sizes, like for
void bar (Base *p, Base *q)
{
*p = *q;
}
;; Function void bar(Base*, Base*) (null)
;; enabled by -tree-original
<<cleanup_point <<< Unknown tree: expr_stmt
(void) (struct Base *) __builtin_memcpy (NON_LVALUE_EXPR <p>, (const struct
Base &) (const struct Base *) NON_LVALUE_EXPR <q>, 5) >>>
>>;
So the langhook was no longer necessary.
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=40058
^ permalink raw reply [flat|nested] 3+ messages in thread
* [Bug c++/40058] C++ FE generates struct assignments with mismatched sizes
2009-05-07 10:58 [Bug c++/40058] New: " rguenth at gcc dot gnu dot org
@ 2010-02-10 5:47 ` jason at gcc dot gnu dot org
2010-02-10 9:42 ` rguenth at gcc dot gnu dot org
1 sibling, 0 replies; 3+ messages in thread
From: jason at gcc dot gnu dot org @ 2010-02-10 5:47 UTC (permalink / raw)
To: gcc-bugs
------- Comment #1 from jason at gcc dot gnu dot org 2010-02-10 05:46 -------
Your comment to the patch that removed LANG_HOOKS_EXPR_SIZE suggests that this
isn't a problem anymore:
http://gcc.gnu.org/ml/gcc-patches/2009-08/msg01593.html
--
jason at gcc dot gnu dot org changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |jason at gcc dot gnu dot org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=40058
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2012-03-21 10:05 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
[not found] <bug-40058-4@http.gcc.gnu.org/bugzilla/>
2012-03-21 10:37 ` [Bug c++/40058] C++ FE generates struct assignments with mismatched sizes jamborm at gcc dot gnu.org
2009-05-07 10:58 [Bug c++/40058] New: " rguenth at gcc dot gnu dot org
2010-02-10 5:47 ` [Bug c++/40058] " jason at gcc dot gnu dot org
2010-02-10 9:42 ` rguenth at gcc dot gnu dot 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).