This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug middle-end/18152] corrupted profile info after optimized compilation and --fprofile-use
- From: "joc at presence-pc dot com" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 25 Oct 2004 22:03:50 -0000
- Subject: [Bug middle-end/18152] corrupted profile info after optimized compilation and --fprofile-use
- References: <20041025214946.18152.joc@presence-pc.com>
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
------- Additional Comments From joc at presence-pc dot com 2004-10-25 22:03 -------
Note also that occurs when trying to compile MySQL with -fprofile-use flag, and
several other files are affected by the problem (but now all the files).
For example, an other error during compilation :
[root@forumsql] /usr/local/mysql-4.1/innobase/page> gcc -DHAVE_CONFIG_H -I. -I.
-I.. -I./../include -I./../../include -I../../include -DDBUG_OFF -O3
-DDBUG_OFF -mtune=athlon-mp -march=athlon-mp -fprofile-use -DDEBUG_OFF
-DUNIV_LINUX -DUNIV_INTEL_X86 -MT page0page.o -MD -MP -MF ".deps/page0page.Tpo"
-c -o page0page.o page0page.c;
page0page.c: In function `page_rec_get_n_recs_before':
page0page.c:1112: error: corrupted profile info: number of executions for edge
1-2 thought to be -1
page0page.c:1112: error: corrupted profile info: number of executions for edge
1-11 thought to be 1497932
page0page.c:1112: error: corrupted profile info: number of iterations for basic
block 2 thought to be -1
page0page.c:1112: error: corrupted profile info: number of executions for edge
16-17 thought to be -3
page0page.c:1112: error: corrupted profile info: number of executions for edge
16-26 thought to be 107993545
When removing the -mtune / -march flags :
[root@forumsql] /usr/local/mysql-4.1/innobase/page> gcc -DHAVE_CONFIG_H -I. -I.
-I.. -I./../include -I./../../include -I../../include -DDBUG_OFF -O3
-DDBUG_OFF -fprofile-use -DDEBUG_OFF -DUNIV_LINUX -DUNIV_INTEL_X86 -MT
page0page.o -MD -MP -MF ".deps/page0page.Tpo" -c -o page0page.o page0page.c;
page0page.c: In function `page_delete_rec_list_end':
page0page.c:700: error: coverage mismatch for function
'page_delete_rec_list_end' while reading counter 'arcs'.
page0page.c:700: error: number of counters is 250 instead of 251
When removing the -O3 flag, a lot of "warning: no coverage for function
'function_name' found", but no more compilation errors.
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=18152