public inbox for gcc-bugs@sourceware.org help / color / mirror / Atom feed
From: "ehrhardt at mathematik dot uni-ulm dot de" <gcc-bugzilla@gcc.gnu.org> To: gcc-bugs@gcc.gnu.org Subject: [Bug c++/11237] New: Internal Compiler Error (segfault) in convert_from_reference at cvt.c:568 Date: Wed, 18 Jun 2003 14:04:00 -0000 [thread overview] Message-ID: <20030618140410.11237.ehrhardt@mathematik.uni-ulm.de> (raw) PLEASE REPLY TO gcc-bugzilla@gcc.gnu.org ONLY, *NOT* gcc-bugs@gcc.gnu.org. http://gcc.gnu.org/bugzilla/show_bug.cgi?id=11237 Summary: Internal Compiler Error (segfault) in convert_from_reference at cvt.c:568 Product: gcc Version: 3.3 Status: UNCONFIRMED Keywords: ice-on-valid-code Severity: critical Priority: P2 Component: c++ AssignedTo: unassigned@gcc.gnu.org ReportedBy: ehrhardt@mathematik.uni-ulm.de CC: gcc-bugs@gcc.gnu.org,stip@mathematik.uni-ulm.de The code ICEs all versions of gcc since 2.95 and up to 3.4. The ICE is in this piece of code in cvt.c where we have type == NULL: tree convert_from_reference (val) tree val; { tree type = TREE_TYPE (val); if (TREE_CODE (type) == OFFSET_TYPE) type = TREE_TYPE (type); if (TREE_CODE (type) == REFERENCE_TYPE) return build_indirect_ref (val, NULL); return val; } Comeau's C++ compiler accepts the code in strict C++ mode. Here's the code: -------------------- cut ----------------------------- template <bool V, class T> struct restrictTo { typedef T type; }; template <typename T, typename U> struct isDifferentType { static const bool value = true; }; template <class D> class ConstDenseVector { }; class MultiIndex { }; template <class C> void operator+(ConstDenseVector<long> u, ConstDenseVector<long> v) { } template <typename U, typename V> typename restrictTo< true || isDifferentType< V, V >::value, void>::type operator+(U u, V v) { operator+<long>(u, u); } int main() { ConstDenseVector<long> v; MultiIndex mi; v + mi; } -------------------- cut ----------------------------- regards Christian
next reply other threads:[~2003-06-18 14:04 UTC|newest] Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top 2003-06-18 14:04 ehrhardt at mathematik dot uni-ulm dot de [this message] 2003-06-18 14:11 ` [Bug c++/11237] " bangerth at dealii dot org 2003-07-01 15:26 ` reichelt at gcc dot gnu dot org 2003-07-15 8:24 ` reichelt at gcc dot gnu dot 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=20030618140410.11237.ehrhardt@mathematik.uni-ulm.de \ --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).