When compiling the testacse attached with -O3 -fprofile-use -freorder-blocks-and-partition flags, I get the following error: (I use the profiling information given by first compiling with -fprofile-generate and than running the executable) tmp.c: In function âmainâ: tmp.c:36: error: insn 186 outside of basic blocks has non-NULL bb field tmp.c:36: internal compiler error: verify_flow_info failed Please submit a full bug report, with preprocessed source if appropriate. See <http://gcc.gnu.org/bugs.html> for instructions. This ICE seems to happen when not all of the bbs are in the same partition (hot/cold).
Created attachment 14545 [details] wrong testcase (please ignore it)
Can you please also attach your profile information and give the exact compiler revision ID that you used to create that information? That way, people without access to POWER can still help debug this problem.
Created attachment 14546 [details] the testcase (please ignore the previous testcase it has been uploaded by mistake)
(In reply to comment #2) > Can you please also attach your profile information and give the exact compiler > revision ID that you used to create that information? That way, people without > access to POWER can still help debug this problem. Sure - gcc version 4.3.0 20071028 (experimental) (GCC)
It seems that verify_flow_info complains about the following note, which is generated in the partitioning phase: (note 234 232 172 11 NOTE_INSN_SWITCH_TEXT_SECTIONS)
I can't reproduce this on x86*. Again, please attach the profile information and state the exact compiler revision you used to generate this profile information.
(In reply to comment #6) > I can't reproduce this on x86*. > Again, please attach the profile information and state the exact compiler > revision you used to generate this profile information. Sorry - I am working on r129702. What do you mean by profile information (a dump file)? Thanks.
When disabling rest_of_handle_reorder_blocks (bbro) the ICE disappears. (it seems that it is not caused due to the partitioning - bbpart)
I mean the files you generate with -fprofile-generate. I expect this to be fully blamable on the partitioning code, and I would like to work in fixing this. But you have to attach the profile information you have generated, or no-one can debug this unless he/she has access to POWER.
(In reply to comment #9) > I mean the files you generate with -fprofile-generate. > I expect this to be fully blamable on the partitioning code, and I would like > to work in fixing this. But you have to attach the profile information you > have generated, or no-one can debug this unless he/she has access to POWER. Sure, I'll attached the gcno file. Please let me know if you need more information to retore the ICE. Thanks
Created attachment 14556 [details] File generated by -fprofile-generate
Created attachment 14562 [details] gcda file
Created attachment 14563 [details] gcno file (with the correct filename)
I still can't reproduce it. What does your gcc -v say?
(In reply to comment #14) > I still can't reproduce it. What does your gcc -v say? Configured with: ../gcc/configure --prefix=/home/eres/check_final/build --with-cpu=default32 --enable-checking --disable-bootstrap --enable-languages=c Thread model: posix gcc version 4.3.0 20071028 (experimental) (GCC)
(In reply to comment #15) > (In reply to comment #14) > > I still can't reproduce it. What does your gcc -v say? > Configured with: ../gcc/configure --prefix=/home/eres/check_final/build > --with-cpu=default32 --enable-checking --disable-bootstrap --enable-languages=c > Thread model: posix > gcc version 4.3.0 20071028 (experimental) (GCC) This bug is reproducable also on updated mainline - r130173 on powerpc64-*-linux. I run the following sequance to get it: /home/eres/check_final/build/bin/gcc tmp.c -fprofile-generate -O3 ./a.out /home/eres/check_final/build/bin/gcc tmp.c -fprofile-use -freorder-blocks-and-partition -O3
I reproduced the ICE on x86_64-linux running tmp.c testcase with r130196. (please make sure you are running tmp.c testcase and not test.c testcase that was uploaded by mistake). GCC configured with: ../gcc/configure --prefix=/home/eres/test_sms/build --enable-checking --enable-bootstrap here is again the sequence I used for running: /home/eres/test_sms/build/gcc/xgcc -B/home/eres/test_sms/build/gcc/ tmp.c -fprofile-generate -O3 ./a.out /home/eres/test_sms/build/gcc/xgcc -B/home/eres/test_sms/build/gcc/ tmp.c -fprofile-use -freorder-blocks-and-partition -O3
Subject: Bug number PR rtl-optimization/34085 A patch for this bug has been added to the patch tracker. The mailing list url for the patch is http://gcc.gnu.org/ml/gcc-patches/2007-11/msg01050.html
Subject: Bug 34085 Author: revitale Date: Mon Nov 26 12:15:02 2007 New Revision: 130435 URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=130435 Log: Fix PR rtl-optimization/34085 Added: trunk/gcc/testsuite/gcc.dg/tree-prof/bb-reorg.c Modified: trunk/gcc/ChangeLog trunk/gcc/bb-reorder.c trunk/gcc/testsuite/ChangeLog
The ICE is fixed on mainline. [The testsuite failure on x86_64 is a separate issue, tracked by PR 34249.]