Created attachment 37827 [details] reduced testcase Compiler output: $ gcc testcase.c testcase.c: In function 'foo': testcase.c:6:4: internal compiler error: in tree_to_shwi, at tree.c:7328 v[~0ULL]; ~^~~~~~~ 0xe40e42 tree_to_shwi(tree_node const*) /repo/gcc-trunk/gcc/tree.c:7328 0x87c2b4 fold_indirect_ref_1(unsigned int, tree_node*, tree_node*) /repo/gcc-trunk/gcc/fold-const.c:14221 0x89c9e3 fold_indirect_ref_loc(unsigned int, tree_node*) /repo/gcc-trunk/gcc/fold-const.c:14300 0x8fe098 gimplify_expr(tree_node**, gimple**, gimple**, bool (*)(tree_node*), int) /repo/gcc-trunk/gcc/gimplify.c:10276 0x900b96 gimplify_stmt(tree_node**, gimple**) /repo/gcc-trunk/gcc/gimplify.c:5644 0x901dd5 gimplify_bind_expr /repo/gcc-trunk/gcc/gimplify.c:1142 0x8fbe62 gimplify_expr(tree_node**, gimple**, gimple**, bool (*)(tree_node*), int) /repo/gcc-trunk/gcc/gimplify.c:10363 0x900b96 gimplify_stmt(tree_node**, gimple**) /repo/gcc-trunk/gcc/gimplify.c:5644 0x9029f4 gimplify_body(tree_node*, bool) /repo/gcc-trunk/gcc/gimplify.c:11295 0x903086 gimplify_function_tree(tree_node*) /repo/gcc-trunk/gcc/gimplify.c:11451 0x7639c7 cgraph_node::analyze() /repo/gcc-trunk/gcc/cgraphunit.c:625 0x766d33 analyze_functions /repo/gcc-trunk/gcc/cgraphunit.c:1086 0x767a78 symbol_table::finalize_compilation_unit() /repo/gcc-trunk/gcc/cgraphunit.c:2540 Please submit a full bug report, with preprocessed source if appropriate. Please include the complete backtrace with any bug report. See <http://gcc.gnu.org/bugs.html> for instructions. All targets seem to be affected. Tested revisions: trunk r233801 - FAIL 5-branch r233800 - FAIL 4_9-branch r233802 - FAIL 4_8-branch r224828 - FAIL (in tree_low_cst) 4_7-branch r211571 - OK
Mine.
Fixed on trunk sofar.
Author: rguenth Date: Tue Mar 1 13:32:13 2016 New Revision: 233852 URL: https://gcc.gnu.org/viewcvs?rev=233852&root=gcc&view=rev Log: 2016-03-01 Richard Biener <rguenther@suse.de> PR middle-end/70022 * fold-const.c (fold_indirect_ref_1): Fix range checking for vector BIT_FIELD_REF extract. * gcc.dg/pr70022.c: New testcase. Added: trunk/gcc/testsuite/gcc.dg/pr70022.c Modified: trunk/gcc/ChangeLog trunk/gcc/fold-const.c trunk/gcc/testsuite/ChangeLog
Author: jakub Date: Wed Mar 2 13:11:21 2016 New Revision: 233905 URL: https://gcc.gnu.org/viewcvs?rev=233905&root=gcc&view=rev Log: PR c/68062 * c-c++-common/vector-compare-4.c: Add -Wno-psabi to dg-options. PR middle-end/70022 * gcc.dg/pr70022.c: Add -w -Wno-psabi to dg-options. Modified: trunk/gcc/testsuite/ChangeLog trunk/gcc/testsuite/c-c++-common/vector-compare-4.c trunk/gcc/testsuite/gcc.dg/pr70022.c
Author: rguenth Date: Wed Apr 6 07:51:19 2016 New Revision: 234773 URL: https://gcc.gnu.org/viewcvs?rev=234773&root=gcc&view=rev Log: 2016-04-06 Richard Biener <rguenther@suse.de> Backport from mainline 2016-03-01 Richard Biener <rguenther@suse.de> PR middle-end/70022 * fold-const.c (fold_indirect_ref_1): Fix range checking for vector BIT_FIELD_REF extract. * gcc.dg/pr70022.c: New testcase. 2016-03-07 Richard Biener <rguenther@suse.de> PR tree-optimization/70115 * tree-ssa-loop-ivcanon.c (propagate_into_all_uses): Remove. (propagate_constants_for_unrolling): Use replace_uses_by. * gcc.dg/torture/pr70115.c: New testcase. 2016-03-29 Richard Biener <rguenther@suse.de> PR middle-end/70424 * ipa-prop.c (ipa_compute_jump_functions_for_edge): Always use alignment returned by get_pointer_alignment_1 if it is bigger than BITS_PER_UNIT. * builtins.c (get_pointer_alignment_1): Do not return true for alignment extracted from SSA info. Added: branches/gcc-5-branch/gcc/testsuite/gcc.dg/pr70022.c branches/gcc-5-branch/gcc/testsuite/gcc.dg/torture/pr70115.c Modified: branches/gcc-5-branch/gcc/ChangeLog branches/gcc-5-branch/gcc/builtins.c branches/gcc-5-branch/gcc/ipa-prop.c branches/gcc-5-branch/gcc/testsuite/ChangeLog branches/gcc-5-branch/gcc/tree-ssa-loop-ivcanon.c
Fixed.
Author: rguenth Date: Thu Jul 7 11:46:08 2016 New Revision: 238087 URL: https://gcc.gnu.org/viewcvs?rev=238087&root=gcc&view=rev Log: 2016-07-07 Richard Biener <rguenther@suse.de> Backport from mainline 2016-04-04 Richard Biener <rguenther@suse.de> PR rtl-optimization/70484 * rtl.h (canon_output_dependence): Declare. * alias.c (canon_output_dependence): New function. * dse.c (record_store): Use canon_output_dependence rather than canon_true_dependence. * gcc.dg/torture/pr70484.c: New testcase. 2016-06-08 Richard Biener <rguenther@suse.de> PR tree-optimization/71452 * tree-ssa.c (non_rewritable_lvalue_p): Make sure that the type used for the SSA rewrite has enough precision to cover the dynamic type of the location. * gcc.dg/torture/pr71452.c: New testcase. 2016-05-06 Richard Biener <rguenther@suse.de> PR middle-end/70931 * dwarf2out.c (native_encode_initializer): Skip zero-sized fields. * gfortran.dg/pr70931.f90: New testcase. 2016-03-01 Richard Biener <rguenther@suse.de> PR middle-end/70022 * fold-const.c (fold_indirect_ref_1): Fix range checking for vector BIT_FIELD_REF extract. * gcc.dg/pr70022.c: New testcase. Added: branches/gcc-4_9-branch/gcc/testsuite/g++.dg/torture/pr71452.C branches/gcc-4_9-branch/gcc/testsuite/gcc.dg/pr70022.c branches/gcc-4_9-branch/gcc/testsuite/gcc.dg/torture/pr70484.c branches/gcc-4_9-branch/gcc/testsuite/gcc.dg/torture/pr71452.c branches/gcc-4_9-branch/gcc/testsuite/gfortran.dg/pr70931.f90 Modified: branches/gcc-4_9-branch/gcc/ChangeLog branches/gcc-4_9-branch/gcc/alias.c branches/gcc-4_9-branch/gcc/dse.c branches/gcc-4_9-branch/gcc/dwarf2out.c branches/gcc-4_9-branch/gcc/fold-const.c branches/gcc-4_9-branch/gcc/rtl.h branches/gcc-4_9-branch/gcc/testsuite/ChangeLog branches/gcc-4_9-branch/gcc/tree-ssa.c
Author: jakub Date: Thu Jul 7 21:44:11 2016 New Revision: 238133 URL: https://gcc.gnu.org/viewcvs?rev=238133&root=gcc&view=rev Log: Backported from mainline 2016-03-02 Jakub Jelinek <jakub@redhat.com> PR middle-end/70022 * gcc.dg/pr70022.c: Add -w -Wno-psabi to dg-options. Modified: branches/gcc-4_9-branch/gcc/testsuite/ChangeLog branches/gcc-4_9-branch/gcc/testsuite/gcc.dg/pr70022.c
Author: marxin Date: Tue Feb 14 10:45:31 2017 New Revision: 245426 URL: https://gcc.gnu.org/viewcvs?rev=245426&root=gcc&view=rev Log: 2016-03-01 Richard Biener <rguenther@suse.de> 2017-02-14 Martin Liska <mliska@suse.cz> Backport from mainline 2016-03-01 Richard Biener <rguenther@suse.de> PR middle-end/70022 PR target/79498 * fold-const.c (fold_indirect_ref_1): Fix range checking for vector BIT_FIELD_REF extract. Modified: branches/gcc-5-branch/gcc/ChangeLog branches/gcc-5-branch/gcc/fold-const.c