This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c/18152] New: 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 21:49:51 -0000
- Subject: [Bug c/18152] New: corrupted profile info after optimized compilation and --fprofile-use
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
Hi,
When trying to compile a file compiled with optimized flag, I got the following
error :
gcc -DHAVE_CONFIG_H -I. -O3 -DDBUG_OFF -Wimplicit -Wreturn-type -Wswitch
-Wtrigraphs -Wcomment -W -Wchar-subscripts -Wformat -Wparentheses -Wsign-compare
-Wwrite-strings -Wunused -mtune=athlon-mp -march=athlon-mp -mfpmath=sse -mmmx
-msse -m3dnow -O3 -fomit-frame-pointer -fmove-all-movables -freduce-all-givs
-frename-registers -fprofile-use -fbranch-target-load-optimize2 -MT
ctype-latin1.o -MD -MP -MF ".deps/ctype-latin1.Tpo" -c -o ctype-latin1.o
ctype-latin1.c;
ctype-latin1.c: In function `my_mb_wc_latin1':
ctype-latin1.c:363: error: corrupted profile info: number of executions for edge
3-4 thought to be 13
ctype-latin1.c:363: error: corrupted profile info: number of executions for edge
3-5 thought to be -12
However if I compile the file without the -O3 flag, it only issues warning :
gcc -DHAVE_CONFIG_H -I. -DDBUG_OFF -Wimplicit -Wreturn-type -Wswitch
-Wtrigraphs -Wcomment -W -Wchar-subscripts -Wformat -Wparentheses -Wsign-compare
-Wwrite-strings -Wunused -mtune=athlon-mp -march=athlon-mp -mfpmath=sse -mmmx
-msse -m3dnow -fomit-frame-pointer -fmove-all-movables -freduce-all-givs
-frename-registers -fprofile-use -fbranch-target-load-optimize2 -MT
ctype-latin1.o -MD -MP -MF ".deps/ctype-latin1.Tpo" -c -o ctype-latin1.o
ctype-latin1.c;
ctype-latin1.c: In function `my_mb_wc_latin1':
ctype-latin1.c:363: warning: no coverage for function 'my_mb_wc_latin1' found.
ctype-latin1.c: In function `my_wc_mb_latin1':
ctype-latin1.c:379: warning: no coverage for function 'my_wc_mb_latin1' found.
ctype-latin1.c: In function `my_strnncoll_latin1_de':
ctype-latin1.c:570: warning: no coverage for function 'my_strnncoll_latin1_de'
found.
ctype-latin1.c: In function `my_strnncollsp_latin1_de':
ctype-latin1.c:633: warning: no coverage for function 'my_strnncollsp_latin1_de'
found.
ctype-latin1.c: In function `my_strnxfrm_latin1_de':
ctype-latin1.c:651: warning: no coverage for function 'my_strnxfrm_latin1_de' found.
ctype-latin1.c: In function `my_hash_sort_latin1_de':
ctype-latin1.c:677: warning: no coverage for function 'my_hash_sort_latin1_de'
found.
So it seems something is wrong with profile-generate / profile-use in this case.
I'm uploading the c, gcda and h files to reproduce the problem with profile-use.
Thanks,
Jocelyn
--
Summary: corrupted profile info after optimized compilation and -
-fprofile-use
Product: gcc
Version: 3.4.1
Status: UNCONFIRMED
Severity: normal
Priority: P2
Component: c
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: joc at presence-pc dot com
CC: gcc-bugs at gcc dot gnu dot org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=18152