public inbox for gcc-bugs@sourceware.org help / color / mirror / Atom feed
From: "markus at trippelsdorf dot de" <gcc-bugzilla@gcc.gnu.org> To: gcc-bugs@gcc.gnu.org Subject: [Bug middle-end/51436] [4.7 Regression] ICE(segfault) in gimplify_and_update_call_from_tree gimple-fold.c:603 Date: Tue, 06 Dec 2011 10:31:00 -0000 [thread overview] Message-ID: <bug-51436-4-D47HDdSpPi@http.gcc.gnu.org/bugzilla/> (raw) In-Reply-To: <bug-51436-4@http.gcc.gnu.org/bugzilla/> http://gcc.gnu.org/bugzilla/show_bug.cgi?id=51436 Markus Trippelsdorf <markus at trippelsdorf dot de> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |markus at trippelsdorf dot | |de --- Comment #1 from Markus Trippelsdorf <markus at trippelsdorf dot de> 2011-12-06 10:31:20 UTC --- Slightly smaller testcase: typedef long unsigned size_t; extern "C" void *memcpy (void *, __const void *, size_t); template < class Dest, class Source > struct BitCastHelper { static Dest cast (const Source & source) __attribute__ ((always_inline)) { Dest dest; memcpy (0, &source, sizeof dest); } }; template < class Dest, class Source > Dest BitCast (Source) { BitCastHelper < Dest, Source >::cast (0); } class MaybeObject { }; class Object:MaybeObject { public: static Object *cast (Object *) { } }; class HeapObject:public Object { }; class String:public HeapObject { }; class ExternalString:public String { }; class ExternalTwoByteString:public ExternalString { }; template < typename T > class Handle { public: Handle () { } T *operator* () const; template < class S > static Handle < T > cast (Handle < S > that) { T::cast (*that); } T **location_; }; template < typename T > T * Handle < T >::operator* () const { *BitCast < T ** >(location_); } void TestCharacterStream () { Handle < String > uc16_string; Handle < ExternalTwoByteString >::cast (uc16_string); }
next prev parent reply other threads:[~2011-12-06 10:31 UTC|newest] Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top 2011-12-06 9:36 [Bug middle-end/51436] New: " burnus at gcc dot gnu.org 2011-12-06 10:31 ` markus at trippelsdorf dot de [this message] 2011-12-06 12:08 ` [Bug middle-end/51436] " rguenth at gcc dot gnu.org 2011-12-06 12:18 ` rguenth at gcc dot gnu.org 2011-12-06 12:18 ` rguenth at gcc dot gnu.org
Reply instructions: You may reply publicly to this message via plain-text email using any one of the following methods: * Save the following mbox file, import it into your mail client, and reply-to-all from there: mbox Avoid top-posting and favor interleaved quoting: https://en.wikipedia.org/wiki/Posting_style#Interleaved_style * Reply using the --to, --cc, and --in-reply-to switches of git-send-email(1): git send-email \ --in-reply-to=bug-51436-4-D47HDdSpPi@http.gcc.gnu.org/bugzilla/ \ --to=gcc-bugzilla@gcc.gnu.org \ --cc=gcc-bugs@gcc.gnu.org \ /path/to/YOUR_REPLY https://kernel.org/pub/software/scm/git/docs/git-send-email.html * If your mail client supports setting the In-Reply-To header via mailto: links, try the mailto: linkBe sure your reply has a Subject: header at the top and a blank line before the message body.
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).