Bug 68368 - [6 regression] ICE tree check: expected integer_cst, have nop_expr in decompose, at tree.h:5123
Summary: [6 regression] ICE tree check: expected integer_cst, have nop_expr in decompo...
Status: RESOLVED DUPLICATE of bug 68385
Alias: None
Product: gcc
Classification: Unclassified
Component: c++ (show other bugs)
Version: 6.0
: P1 normal
Target Milestone: 6.0
Assignee: Not yet assigned to anyone
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2015-11-15 21:40 UTC by Christophe Lyon
Modified: 2015-11-26 15:10 UTC (History)
1 user (show)

See Also:
Host:
Target: arm-none-eabi
Build:
Known to work:
Known to fail:
Last reconfirmed: 2015-11-17 00:00:00


Attachments
eh_personality.ii (14.02 KB, text/plain)
2015-11-15 21:40 UTC, Christophe Lyon
Details
reduced case (2.31 KB, text/plain)
2015-11-17 09:46 UTC, chrbr
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Christophe Lyon 2015-11-15 21:40:59 UTC
Created attachment 36719 [details]
eh_personality.ii

I've noticed this ICE while building GCC:
/home/christophe.lyon/src/GCC/sources/gcc-fsf/trunk-for-crontab/libstdc++-v3/libsupc++/eh_personality.cc: In function '_Unwind_Reason_Code __cxxabiv1::__gxx_personality_v0(_Unwind_State, _Unwind_Control_Block*, _Unwind_Context*)':
/home/christophe.lyon/src/GCC/sources/gcc-fsf/trunk-for-crontab/libstdc++-v3/libsupc++/eh_personality.cc:394:25: internal compiler error: tree check: expected integer_cst, have nop_expr in decompose, at tree.h:5123
          UNWIND_STACK_REG))
                         ^

0x12c5f26 tree_check_failed(tree_node const*, char const*, int, char const*, ...)
	/home/christophe.lyon/src/GCC/sources/gcc-fsf/trunk-for-crontab/gcc/tree.c:9587
0x6b0fe1 tree_check(tree_node const*, char const*, int, char const*, tree_code)
	/home/christophe.lyon/src/GCC/sources/gcc-fsf/trunk-for-crontab/gcc/tree.h:3212
0x7208bc wi::int_traits<tree_node const*>::decompose(long*, unsigned int, tree_node const*)
	/home/christophe.lyon/src/GCC/sources/gcc-fsf/trunk-for-crontab/gcc/tree.h:5123
0x897672 wide_int_ref_storage<false>::wide_int_ref_storage<tree_node*>(tree_node* const&)
	/home/christophe.lyon/src/GCC/sources/gcc-fsf/trunk-for-crontab/gcc/wide-int.h:936
0x897630 generic_wide_int<wide_int_ref_storage<false> >::generic_wide_int<tree_node*>(tree_node* const&)
	/home/christophe.lyon/src/GCC/sources/gcc-fsf/trunk-for-crontab/gcc/wide-int.h:714
0x1442950 generic_simplify_172
	/home/christophe.lyon/src/GCC/builds/gcc-fsf-trunk-for-crontab/obj-arm-none-eabi/gcc3/gcc/generic-match.c:6142
0x14808ae generic_simplify_EQ_EXPR
	/home/christophe.lyon/src/GCC/builds/gcc-fsf-trunk-for-crontab/obj-arm-none-eabi/gcc3/gcc/generic-match.c:22841
0x1487045 generic_simplify(unsigned int, tree_code, tree_node*, tree_node*, tree_node*)
	/home/christophe.lyon/src/GCC/builds/gcc-fsf-trunk-for-crontab/obj-arm-none-eabi/gcc3/gcc/generic-match.c:25312
0xc10ff8 fold_binary_loc(unsigned int, tree_code, tree_node*, tree_node*, tree_node*)
	/home/christophe.lyon/src/GCC/sources/gcc-fsf/trunk-for-crontab/gcc/fold-const.c:9138
0xc219d4 fold_build2_stat_loc(unsigned int, tree_code, tree_node*, tree_node*, tree_node*)
	/home/christophe.lyon/src/GCC/sources/gcc-fsf/trunk-for-crontab/gcc/fold-const.c:12333
0x142fadd generic_simplify_46
	/home/christophe.lyon/src/GCC/builds/gcc-fsf-trunk-for-crontab/obj-arm-none-eabi/gcc3/gcc/generic-match.c:2014
0x147f74a generic_simplify_EQ_EXPR
	/home/christophe.lyon/src/GCC/builds/gcc-fsf-trunk-for-crontab/obj-arm-none-eabi/gcc3/gcc/generic-match.c:22441
0x1487045 generic_simplify(unsigned int, tree_code, tree_node*, tree_node*, tree_node*)
	/home/christophe.lyon/src/GCC/builds/gcc-fsf-trunk-for-crontab/obj-arm-none-eabi/gcc3/gcc/generic-match.c:25312
0xc10ff8 fold_binary_loc(unsigned int, tree_code, tree_node*, tree_node*, tree_node*)
	/home/christophe.lyon/src/GCC/sources/gcc-fsf/trunk-for-crontab/gcc/fold-const.c:9138
0xc215cb fold(tree_node*)
	/home/christophe.lyon/src/GCC/sources/gcc-fsf/trunk-for-crontab/gcc/fold-const.c:11973
0x6c4ede build_new_op_1
	/home/christophe.lyon/src/GCC/sources/gcc-fsf/trunk-for-crontab/gcc/cp/call.c:5730
0x6c50c6 build_new_op(unsigned int, tree_code, int, tree_node*, tree_node*, tree_node*, tree_node**, int)
	/home/christophe.lyon/src/GCC/sources/gcc-fsf/trunk-for-crontab/gcc/cp/call.c:5803
0x87bddf build_x_binary_op(unsigned int, tree_code, tree_node*, tree_code, tree_node*, tree_code, tree_node**, int)
	/home/christophe.lyon/src/GCC/sources/gcc-fsf/trunk-for-crontab/gcc/cp/typeck.c:3828
0x81cdf4 cp_parser_binary_expression
	/home/christophe.lyon/src/GCC/sources/gcc-fsf/trunk-for-crontab/gcc/cp/parser.c:8621
0x81d0fd cp_parser_assignment_expression
	/home/christophe.lyon/src/GCC/sources/gcc-fsf/trunk-for-crontab/gcc/cp/parser.c:8742
Please submit a full bug report,


No optimization flag is needed to trigger the ICE.

GCC is configured as:
--target=arm-none-eabi --with-newlib --with-mode=arm --with-cpu=cortex-a9 --with-fpu=neon

I noticed this problem with bare-metal ARM targets (using Newlib). arm-linux targets (using glibc) are OK.
Comment 1 Richard Biener 2015-11-16 10:15:36 UTC
dup

*** This bug has been marked as a duplicate of bug 68362 ***
Comment 2 chrbr 2015-11-17 09:46:01 UTC
Created attachment 36731 [details]
reduced case

still fails at rev 230435

just call with 
cc1plus testcase-min.ii

internal compiler error: tree check: expected integer_cst, have nop_expr in decompose, at tree.h:5123
          13))
            ^
Comment 3 chrbr 2015-11-17 10:05:54 UTC
reopened with reduced case.
Comment 4 Christophe Lyon 2015-11-18 15:06:03 UTC
For the record, it still fails at r230462
Comment 5 Christophe Lyon 2015-11-25 17:09:47 UTC
I've noticed that this has just been fixed by r230871, so it was in fact a dup of pr68385
Comment 6 Christophe Lyon 2015-11-25 17:11:01 UTC
Fixed by r230871.

*** This bug has been marked as a duplicate of bug 68385 ***
Comment 7 chrbr 2015-11-26 15:09:00 UTC
fixed @r230871 with:

r230871 | jason | 2015-11-25 15:35:24 +0100 (Wed, 25 Nov 2015) | 6 lines

	PR c++/68385

	* tree.c (integer_zerop, integer_onep, integer_each_onep)
	(integer_all_onesp, integer_minus_onep, integer_pow2p)
	(integer_nonzerop, integer_truep, tree_log2, tree_floor_log2)
	(real_zerop, real_onep, real_minus_onep): Remove STRIP_NOPS.
Comment 8 chrbr 2015-11-26 15:10:51 UTC

*** This bug has been marked as a duplicate of bug 68385 ***