https://gcc.gnu.org/bugzilla/show_bug.cgi?id=82633
--- Comment #8 from Andrew Pinski ---
You might need -fkeep-static-functions also.
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=82633
Andrew Pinski changed:
What|Removed |Added
Status|UNCONFIRMED |RESOLVED
Resolution|---
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=82633
--- Comment #6 from Martin Liška ---
And yes LLVM does it as one would expect:
removed.cpp:
1| |class MyClass2
2| |{
3| | public:
4| 0|void iterate() { a = 5; }
5| |
6| |int a;
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=82633
--- Comment #5 from Martin Liška ---
(In reply to Richard Biener from comment #4)
> (In reply to Martin Liška from comment #3)
> > I don't think so Richi: documentation says:
> >
> > The execution count is ‘-’ for lines containing no code.
>
>
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=82633
--- Comment #4 from Richard Biener ---
(In reply to Martin Liška from comment #3)
> I don't think so Richi: documentation says:
>
> The execution count is ‘-’ for lines containing no code.
"code" or "source code"?
Because what's the difference
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=82633
--- Comment #3 from Martin Liška ---
I don't think so Richi: documentation says:
The execution count is ‘-’ for lines containing no code.
And for:
$ cat removed.cpp
class MyClass2
{
public:
void iterate() { a = 5; }
int a;
};
void f
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=82633
--- Comment #2 from Richard Biener ---
Err. Isn't '-' effectively the same as '0'? Maybe not exactly but '-' as
"optimized away" is correct as well, no?
I don't think this is a bug...
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=82633
--- Comment #1 from Martin Liška ---
LLVM does:
/home/marxin/Programming/testcases/gcov-problems/removed.cpp:
1| |class MyClass2
2| |{
3| | public:
4| 0|void iterate() { a = 5; }
5| |
6|