https://gcc.gnu.org/bugzilla/show_bug.cgi?id=68771

--- Comment #16 from Daniel Vollmer <zerolo at gmail dot com> ---
Created attachment 46038
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=46038&action=edit
reproducer for threading issue -fprofile-generate

The attached example (see comments for command-lines) yields the following for
me (on Darwin):

> g++-7 -std=c++11 -fopenmp test.cpp -Ofast -flto -fprofile-generate
> ./a.out
> g++-7 -std=c++11 -fopenmp test.cpp -Ofast -flto -fprofile-use
test.cpp: In function 'parallel(int)':
test.cpp:24:1: error: corrupted profile info: profile data is not
flow-consistent
 }
 ^
test.cpp:24:1: error: corrupted profile info: number of iterations for basic
block 0 thought to be -2120
test.cpp:24:1: error: corrupted profile info: number of executions for edge 0-2
thought to be -2120
test.cpp:24:1: error: corrupted profile info: number of iterations for basic
block 2 thought to be -2120
test.cpp:24:1: error: corrupted profile info: number of executions for edge 2-3
thought to be -2120
test.cpp:24:1: error: corrupted profile info: number of executions for edge 3-5
thought to be -2120
test.cpp:24:1: error: corrupted profile info: number of executions for edge 3-4
thought to be 3732
test.cpp:24:1: error: corrupted profile info: number of iterations for basic
block 5 thought to be -2120
test.cpp:24:1: error: corrupted profile info: number of executions for edge 5-6
thought to be -2120
test.cpp:24:1: error: corrupted profile info: number of iterations for basic
block 1 thought to be -2120
test.cpp: At top level:
test.cpp:24:1: warning: Missing counts for called function parallel(int)/1216

Reply via email to