public inbox for gcc-bugs@sourceware.org help / color / mirror / Atom feed
From: "seongbae dot park at gmail dot com" <gcc-bugzilla@gcc.gnu.org> To: gcc-bugs@gcc.gnu.org Subject: [Bug c++/29225] [4.0/4.1/4.2 regression] ICE in gimplify_expr, at gimplify.c:4513 Date: Fri, 13 Oct 2006 02:27:00 -0000 [thread overview] Message-ID: <20061013022709.3290.qmail@sourceware.org> (raw) In-Reply-To: <bug-29225-5724@http.gcc.gnu.org/bugzilla/> ------- Comment #5 from seongbae dot park at gmail dot com 2006-10-13 02:27 ------- A modified and valid case which doesn't cause ICE: template <typename LHS, typename RHS>bool operator<( LHS lhs, RHS rhs ); struct ComputedAttribute { int descriptor(); }; class AttributeDescriptor {}; template <typename T, typename R> struct less_member_2_m { typedef R (T::* T_mem_ptr) (); T_mem_ptr mem_ptr; template <typename R_alt> bool operator()(R_alt & rhs ) { T a; return ( a.*mem_ptr )() < rhs ; } }; void computedAttribute( AttributeDescriptor & desc ) { less_member_2_m<ComputedAttribute, int> m; m.mem_ptr = &ComputedAttribute::descriptor; m(desc); } Change the operator() to: template <typename R_alt> bool operator()(R_alt & rhs ) { T a; return ( a.*mem_ptr ) < rhs ; } causes the ICE. # /home/spark/blds/trunk-work/bin/g++ -v Using built-in specs. Target: i686-pc-linux-gnu Configured with: /home/spark/local/ws/trunk-work/configure --prefix=/home/spark/blds/trunk-work/ --disable-nls --disable-multilib -enable-threads=posix --enable-symvers=gnu --enable-__cxa_atexit -enable-c99 --enable-long-long --enable-shared --enable-languages=c,c++ Thread model: posix gcc version 4.2.0 20061006 (experimental) # /home/spark/blds/trunk-work/bin/g++ correct.cc -c # /home/spark/blds/trunk-work/bin/g++ incorrect.cc -c incorrect.cc: In member function 'bool less_member_2_m<T, R>::operator()(R_alt&) [with R_alt = AttributeDescriptor, T = ComputedAttribute, R = int]': incorrect.cc:28: instantiated from here incorrect.cc:19: internal compiler error: in gimplify_expr, at gimplify.c:5806 Please submit a full bug report, with preprocessed source if appropriate. See <URL:http://gcc.gnu.org/bugs.html> for instructions. # Note that this is the same ICE I get from the attachment. -- seongbae dot park at gmail dot com changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |seongbae dot park at gmail | |dot com http://gcc.gnu.org/bugzilla/show_bug.cgi?id=29225
next prev parent reply other threads:[~2006-10-13 2:27 UTC|newest] Thread overview: 17+ messages / expand[flat|nested] mbox.gz Atom feed top 2006-09-25 22:17 [Bug c++/29225] New: [4.0/4.1/4.2 regression] ICE in make_decl_rtl, at varasm.c:883 debian-gcc at lists dot debian dot org 2006-09-25 22:19 ` [Bug c++/29225] " debian-gcc at lists dot debian dot org 2006-09-25 22:33 ` pinskia at gcc dot gnu dot org 2006-09-25 22:36 ` pinskia at gcc dot gnu dot org 2006-09-26 7:00 ` [Bug c++/29225] [4.0/4.1/4.2 regression] ICE in gimplify_expr, at gimplify.c:4513 pinskia at gcc dot gnu dot org 2006-09-26 17:46 ` pinskia at gcc dot gnu dot org 2006-10-01 23:01 ` mmitchel at gcc dot gnu dot org 2006-10-13 2:27 ` seongbae dot park at gmail dot com [this message] 2007-02-03 20:25 ` [Bug c++/29225] [4.0/4.1/4.2/4.3 " gdr at gcc dot gnu dot org 2007-02-03 21:01 ` pinskia at gcc dot gnu dot org 2007-02-14 9:18 ` mmitchel at gcc dot gnu dot org 2007-10-27 21:10 ` aldyh at gcc dot gnu dot org 2007-11-12 16:20 ` jakub at gcc dot gnu dot org 2007-11-12 23:17 ` jakub at gcc dot gnu dot org 2007-11-12 23:23 ` [Bug c++/29225] [4.0/4.1/4.2 " jakub at gcc dot gnu dot org 2008-07-04 21:33 ` [Bug c++/29225] [4.2 " jsm28 at gcc dot gnu dot org 2009-03-30 19:38 ` jsm28 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=20061013022709.3290.qmail@sourceware.org \ --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).