[Bug c++/50800] Internal compiler error in finish_member_declarations, possibly related to may_alias attribute
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=50800 Jason Merrill changed: What|Removed |Added Status|ASSIGNED|RESOLVED Version|4.6.1 |6.0 Resolution|--- |FIXED --- Comment #20 from Jason Merrill --- Fixed in GCC 6.
[Bug c++/50800] Internal compiler error in finish_member_declarations, possibly related to may_alias attribute
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=50800 edanor1 at wp dot pl edanor1 at wp dot pl changed: What|Removed |Added CC||edanor1 at wp dot pl --- Comment #19 from edanor1 at wp dot pl edanor1 at wp dot pl --- Hi everyone, I just got a similar output on GCC 5.1.0. I think it might be related, however this appears to be for different syntax. Flags are: -mavx -std=c++11 -Wfatal-errors -O0 Please let me know if you still need a test case. .../BOOST/boost_1_57_0/boost/type_traits/remove_reference.hpp:42:1: note: in expansion of macro ‘BOOST_TT_AUX_TYPE_TRAIT_PARTIAL_SPEC1_1’ BOOST_TT_AUX_TYPE_TRAIT_PARTIAL_SPEC1_1(typename T,remove_reference,T,T) ^ 0x6ef1fc finish_member_declaration(tree_node*) ../../gcc/cp/semantics.c:2872 0x66af2d instantiate_class_template_1 ../../gcc/cp/pt.c:9487 0x66af2d instantiate_class_template(tree_node*) ../../gcc/cp/pt.c:9688 0x6c5bed complete_type(tree_node*) ../../gcc/cp/typeck.c:146 0x653e5f tsubst(tree_node*, tree_node*, int, tree_node*) ../../gcc/cp/pt.c:12441 0x65e759 tsubst_template_args ../../gcc/cp/pt.c:10257 0x65ec84 tsubst_aggr_type ../../gcc/cp/pt.c:10454 0x653891 tsubst(tree_node*, tree_node*, int, tree_node*) ../../gcc/cp/pt.c:11909 0x66b909 instantiate_class_template_1 ../../gcc/cp/pt.c:9275 0x66b909 instantiate_class_template(tree_node*) ../../gcc/cp/pt.c:9688 0x6c5bed complete_type(tree_node*) ../../gcc/cp/typeck.c:146 0x653e5f tsubst(tree_node*, tree_node*, int, tree_node*) ../../gcc/cp/pt.c:12441 0x6519e1 tsubst_copy_and_build(tree_node*, tree_node*, int, tree_node*, bool, bool) ../../gcc/cp/pt.c:14654 0x6514e5 tsubst_copy_and_build(tree_node*, tree_node*, int, tree_node*, bool, bool) ../../gcc/cp/pt.c:15066 0x653320 tsubst(tree_node*, tree_node*, int, tree_node*) ../../gcc/cp/pt.c:12530 0x660c02 tsubst_decl ../../gcc/cp/pt.c:11339 0x653c54 tsubst(tree_node*, tree_node*, int, tree_node*) ../../gcc/cp/pt.c:11830 0x66aed2 instantiate_class_template_1 ../../gcc/cp/pt.c:9424 0x66aed2 instantiate_class_template(tree_node*) ../../gcc/cp/pt.c:9688 0x6c5bed complete_type(tree_node*) ../../gcc/cp/typeck.c:146
[Bug c++/50800] Internal compiler error in finish_member_declarations, possibly related to may_alias attribute
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=50800 Richard Biener rguenth at gcc dot gnu.org changed: What|Removed |Added Target Milestone|4.8.5 |---
[Bug c++/50800] Internal compiler error in finish_member_declarations, possibly related to may_alias attribute
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=50800 Paolo Carlini paolo.carlini at oracle dot com changed: What|Removed |Added CC||tim at klingt dot org --- Comment #18 from Paolo Carlini paolo.carlini at oracle dot com --- *** Bug 57472 has been marked as a duplicate of this bug. ***
[Bug c++/50800] Internal compiler error in finish_member_declarations, possibly related to may_alias attribute
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=50800 --- Comment #17 from Jason Merrill jason at gcc dot gnu.org --- Author: jason Date: Wed Apr 29 20:51:05 2015 New Revision: 222591 URL: https://gcc.gnu.org/viewcvs?rev=222591root=gccview=rev Log: PR c++/50800 * tree.c (apply_identity_attributes): Fix handling of classes. Added: trunk/gcc/testsuite/g++.dg/cpp0x/alignas3.C Modified: trunk/gcc/cp/ChangeLog trunk/gcc/cp/tree.c
[Bug c++/50800] Internal compiler error in finish_member_declarations, possibly related to may_alias attribute
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=50800 --- Comment #16 from Jason Merrill jason at gcc dot gnu.org --- Author: jason Date: Tue Apr 28 14:43:54 2015 New Revision: 222530 URL: https://gcc.gnu.org/viewcvs?rev=222530root=gccview=rev Log: PR c++/50800 * tree.c (strip_typedefs): Add remove_attributes parm. (strip_typedefs_expr): Likewise. (apply_identity_attributes): New subroutine of strip_typedefs. * pt.c (canonicalize_type_argument): Let strip_typedefs handle attrs. (convert_nontype_argument, unify): Likewise. * cp-tree.h: Adjust. Added: trunk/gcc/testsuite/g++.dg/ext/attrib50.C Modified: trunk/gcc/cp/ChangeLog trunk/gcc/cp/cp-tree.h trunk/gcc/cp/pt.c trunk/gcc/cp/tree.c trunk/gcc/testsuite/g++.dg/abi/mangle40.C trunk/gcc/testsuite/g++.dg/ext/alias-mangle.C
[Bug c++/50800] Internal compiler error in finish_member_declarations, possibly related to may_alias attribute
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=50800 --- Comment #14 from Jason Merrill jason at gcc dot gnu.org --- Author: jason Date: Fri Apr 24 19:11:45 2015 New Revision: 222419 URL: https://gcc.gnu.org/viewcvs?rev=222419root=gccview=rev Log: PR c++/50800 gcc/ * tree.c (build_reference_type_for_mode): Don't pass can_alias_all down when building TYPE_CANONICAL. (build_pointer_type_for_mode): Likewise. gcc/cp/ * typeck.c (structural_comptypes): Don't check TYPE_REF_CAN_ALIAS_ALL. Modified: trunk/gcc/ChangeLog trunk/gcc/cp/ChangeLog trunk/gcc/cp/typeck.c trunk/gcc/tree.c
[Bug c++/50800] Internal compiler error in finish_member_declarations, possibly related to may_alias attribute
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=50800 --- Comment #15 from Jason Merrill jason at gcc dot gnu.org --- Author: jason Date: Fri Apr 24 20:53:28 2015 New Revision: 222426 URL: https://gcc.gnu.org/viewcvs?rev=222426root=gccview=rev Log: PR c++/50800 * g++.dg/ext/alias-canon2.C: Remove clashing fn definitions. Modified: trunk/gcc/testsuite/g++.dg/ext/alias-canon2.C
[Bug c++/50800] Internal compiler error in finish_member_declarations, possibly related to may_alias attribute
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=50800 --- Comment #13 from Jason Merrill jason at gcc dot gnu.org --- Author: jason Date: Thu Apr 23 15:55:21 2015 New Revision: 222377 URL: https://gcc.gnu.org/viewcvs?rev=222377root=gccview=rev Log: PR c++/50800 * tree.c (strip_typedefs): Add remove_attributes parm. (strip_typedefs_expr): Likewise. (apply_identity_attributes): New subroutine of strip_typedefs. * pt.c (canonicalize_type_argument): Let strip_typedefs handle attrs. (convert_nontype_argument, unify): Likewise. * cp-tree.h: Adjust. Added: trunk/gcc/testsuite/g++.dg/ext/attrib50.C Modified: trunk/gcc/cp/ChangeLog trunk/gcc/cp/cp-tree.h trunk/gcc/cp/pt.c trunk/gcc/cp/tree.c trunk/gcc/testsuite/g++.dg/abi/mangle40.C trunk/gcc/testsuite/g++.dg/ext/alias-canon2.C trunk/gcc/testsuite/g++.dg/ext/alias-mangle.C
[Bug c++/50800] Internal compiler error in finish_member_declarations, possibly related to may_alias attribute
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=50800 Jason Merrill jason at gcc dot gnu.org changed: What|Removed |Added Status|NEW |ASSIGNED Depends on||18174 Assignee|unassigned at gcc dot gnu.org |jason at gcc dot gnu.org --- Comment #12 from Jason Merrill jason at gcc dot gnu.org --- This is related to the fix for bug 18174, which made int a different type from A::TA. But this difference is not reflected in the mangling, so Bint and BA::TA have the same mangling, which we can't allow. The compiler tries to handle this by stripping attributes from template arguments, so that BA::TA is treated as Bint. This was failing in this case because the middle end was giving the two types different TYPE_CANONICAL. I guess we need to work harder at stripping the attributes.
[Bug c++/50800] Internal compiler error in finish_member_declarations, possibly related to may_alias attribute
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=50800 Jakub Jelinek jakub at gcc dot gnu.org changed: What|Removed |Added Target Milestone|4.8.4 |4.8.5 --- Comment #11 from Jakub Jelinek jakub at gcc dot gnu.org --- GCC 4.8.4 has been released.
[Bug c++/50800] Internal compiler error in finish_member_declarations, possibly related to may_alias attribute
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=50800 Matthias Kretz kretz at kde dot org changed: What|Removed |Added CC||kretz at kde dot org --- Comment #9 from Matthias Kretz kretz at kde dot org --- I assume I hit the same issue. I got the testcase down to a few lines: #include type_traits template typename L typename std::remove_referenceL::type foo(L lhs, int rhs); template typename T T d(T i) { enum { Size = sizeof(int) }; return foo(i, Size); } template typename T struct A { typedef int TA __attribute__((__may_alias__)); }; int main() { typedef Aint V; typedef typename std::remove_referencetypename V::TA ::type T; return d(1); } It only needs the -std=c++11 flag. Tested to fail: 4.8.0/1/2/3 and 4.9.0/1/2 (4.9.2 is 20140924). Backtrace from 4.9.2 snapshot: /opt/gcc-4.9-snapshot/include/c++/4.9.2/type_traits:1488:5: internal compiler error: in finish_member_declaration, at cp/semantics.c:2827 { typedef _Tp type; }; ^ 0x6395c0 finish_member_declaration(tree_node*) ../.././gcc/cp/semantics.c:2827 0x5b975d instantiate_class_template_1 ../.././gcc/cp/pt.c:9244 0x5b975d instantiate_class_template(tree_node*) ../.././gcc/cp/pt.c:9445 0x61039d complete_type(tree_node*) ../.././gcc/cp/typeck.c:134 0x5a8531 tsubst(tree_node*, tree_node*, int, tree_node*) ../.././gcc/cp/pt.c:12163 0x5acac7 tsubst_function_type ../.././gcc/cp/pt.c:11344 0x5a7e7f tsubst(tree_node*, tree_node*, int, tree_node*) ../.././gcc/cp/pt.c:12081 0x5ae8fe tsubst_decl ../.././gcc/cp/pt.c:10596 0x5a822f tsubst(tree_node*, tree_node*, int, tree_node*) ../.././gcc/cp/pt.c:11543 0x5b09fb instantiate_template_1 ../.././gcc/cp/pt.c:15580 0x5b09fb instantiate_template(tree_node*, tree_node*, int) ../.././gcc/cp/pt.c:15630 0x5b6c2e fn_type_unification(tree_node*, tree_node*, tree_node*, tree_node* const*, unsigned int, tree_node*, unification_kind_t, int, bool, bool) ../.././gcc/cp/pt.c:15979 0x574031 add_template_candidate_real ../.././gcc/cp/call.c:2998 0x571984 add_template_candidate ../.././gcc/cp/call.c:3095 0x571984 add_candidates ../.././gcc/cp/call.c:5169 0x5755d9 perform_overload_resolution ../.././gcc/cp/call.c:3904 0x5770ea build_new_function_call(tree_node*, vectree_node*, va_gc, vl_embed**, bool, int) ../.././gcc/cp/call.c:3981 0x639891 finish_call_expr(tree_node*, vectree_node*, va_gc, vl_embed**, bool, bool, int) ../.././gcc/cp/semantics.c:2358 0x5a1b34 tsubst_copy_and_build(tree_node*, tree_node*, int, tree_node*, bool, bool) ../.././gcc/cp/pt.c:14861 0x5a519c tsubst_expr ../.././gcc/cp/pt.c:14048
[Bug c++/50800] Internal compiler error in finish_member_declarations, possibly related to may_alias attribute
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=50800 Markus Trippelsdorf trippels at gcc dot gnu.org changed: What|Removed |Added CC||trippels at gcc dot gnu.org --- Comment #10 from Markus Trippelsdorf trippels at gcc dot gnu.org --- markus@x4 tmp % cat finish.ii template typename struct B; template typename _Tp struct B_Tp { typedef _Tp type; }; template typename L typename BL::type foo(L ); int a; struct A { typedef int TA __attribute__((__may_alias__)); }; void d() { foo(a); } int main() { BA::TA b; } markus@x4 tmp % g++ -std=c++11 finish.ii finish.ii: In instantiation of ‘struct Bint’: finish.ii:15:25: required from here finish.ii:4:17: internal compiler error: in finish_member_declaration, at cp/semantics.c:2844
[Bug c++/50800] Internal compiler error in finish_member_declarations, possibly related to may_alias attribute
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=50800 Markus Trippelsdorf trippels at gcc dot gnu.org changed: What|Removed |Added Target Milestone|--- |4.8.4 Known to fail||4.8.3, 4.9.1, 5.0
[Bug c++/50800] Internal compiler error in finish_member_declarations, possibly related to may_alias attribute
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=50800 --- Comment #6 from Mathias Gaunard mathias at gaunard dot com 2012-08-14 10:53:07 UTC --- I've had this happen with 4.7.1 without any may_alias involved. Why is this bug still marked 'waiting'? Are more testcases necessary?
[Bug c++/50800] Internal compiler error in finish_member_declarations, possibly related to may_alias attribute
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=50800 Paolo Carlini paolo.carlini at oracle dot com changed: What|Removed |Added Status|WAITING |NEW --- Comment #7 from Paolo Carlini paolo.carlini at oracle dot com 2012-08-14 10:58:40 UTC --- Became Waiting with Comment #2 and then nobody updated the status, it's as simple as that.
[Bug c++/50800] Internal compiler error in finish_member_declarations, possibly related to may_alias attribute
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=50800 --- Comment #8 from Marc Glisse glisse at gcc dot gnu.org 2012-08-14 11:03:31 UTC --- Although if you have a testcase without may_alias, you should attach it.
[Bug c++/50800] Internal compiler error in finish_member_declarations, possibly related to may_alias attribute
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=50800 --- Comment #5 from John Regehr regehr at cs dot utah.edu 2011-12-05 22:07:16 UTC --- Created attachment 25997 -- http://gcc.gnu.org/bugzilla/attachment.cgi?id=25997 smaller again
[Bug c++/50800] Internal compiler error in finish_member_declarations, possibly related to may_alias attribute
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=50800 --- Comment #4 from John Regehr regehr at cs dot utah.edu 2011-12-03 07:01:50 UTC --- Created attachment 25977 -- http://gcc.gnu.org/bugzilla/attachment.cgi?id=25977 smaller test case
[Bug c++/50800] Internal compiler error in finish_member_declarations, possibly related to may_alias attribute
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=50800 --- Comment #3 from Mathias Gaunard mathias at gaunard dot com 2011-10-20 20:07:24 UTC --- Created attachment 25562 -- http://gcc.gnu.org/bugzilla/attachment.cgi?id=25562 Reduced testcase Original testcase reduced using automated delta tools
[Bug c++/50800] Internal compiler error in finish_member_declarations, possibly related to may_alias attribute
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=50800 --- Comment #1 from Mathias Gaunard mathias at gaunard dot com 2011-10-19 18:20:06 UTC --- Testcase is here (couldn't attach it due to bugzilla size restrictions): http://mathias.gaunard.com/data/ice_finish_member_declaration.cpp
[Bug c++/50800] Internal compiler error in finish_member_declarations, possibly related to may_alias attribute
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=50800 Paolo Carlini paolo.carlini at oracle dot com changed: What|Removed |Added Status|UNCONFIRMED |WAITING Last reconfirmed||2011-10-19 Ever Confirmed|0 |1 --- Comment #2 from Paolo Carlini paolo.carlini at oracle dot com 2011-10-19 23:56:54 UTC --- That you couldn't attach it should tell you something... Please do your best to reduce its size: http://gcc.gnu.org/wiki/A_guide_to_testcase_reduction