Created attachment 42741 [details] gzipped C source code The attached C code, when compiled by recent gcc trunk and flag -O2, does this: zend_vm_execute.h:63744:1: error: No region crossing jump at section boundary in bb 2545 } It compiled fine without the -O2 flag. I'll have a go at finding a range of gcc revisions where the problem seems to occur and I'll have a go at reducing the code. I make this the 400th bug I've reported since Oct 2010.
Bug seems to occur between revisions 253840 and 253974.
That is weird, because already e.g. r250000 ICEs with: internal compiler error: in to_reg_br_prob_base, at profile-count.h:189 and so does r253842. It is true that r253974 ICEs differently, as you wrote.
Created attachment 42749 [details] C source code After 12 hours reducing, this is what I got. I think creduce isn't very fast, in some cases.
My bisection says it starts with r249104, but that doesn't make sense, so it is likely r249097 or r249098 or some other change from that time.
(In reply to Jakub Jelinek from comment #4) > My bisection says it starts with r249104, but that doesn't make sense, so it > is likely r249097 or r249098 or some other change from that time. One needs to tweak a bit flags, so with: $ gcc pr83213.c -O2 -Wno-implicit-function-declaration -c -freorder-functions -freorder-blocks-and-partition -fprofile-use It started in r249013 which is: SVN revision: 249013 Author: hubicka * predict.c (maybe_hot_bb_p): Do not check profile status. (maybe_hot_edge_p): Likewise. (probably_never_executed): Check for zero counts even if profile is not read. (unlikely_executed_edge_p): New function. (unlikely_executed_stmt_p): New function. (unlikely_executed_bb_p): New function. (set_even_probabilities): Use unlikely predicates. (combine_predictions_for_bb): Likewise. (predict_paths_for_bb): Likewise. (predict_paths_leading_to_edge): Likewise. (determine_unlikely_bbs): New function. (estimate_bb_frequencies): Use it. (compute_function_frequency): Use zero counts even if profile is not read. * profile-count.h: Fix typo. * g++.dg/tree-ssa/counts-1.C: New testcase. * gcc.dg/tree-ssa/counts-1.c: New testcase. It's also not real trigger as it only fixes some predicates related to hotness of a basic-block.
Created attachment 43139 [details] gcc8-pr83213.patch Untested fix. No testcase, as even the reduced one is way too large.
Author: jakub Date: Tue Jan 16 08:54:03 2018 New Revision: 256728 URL: https://gcc.gnu.org/viewcvs?rev=256728&root=gcc&view=rev Log: PR rtl-optimization/83213 * recog.c (peep2_attempt): Copy over CROSSING_JUMP_P from peepinsn to last if both are JUMP_INSNs. Modified: trunk/gcc/ChangeLog trunk/gcc/recog.c
Fixed.