This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug c++/12076] gcov misreports coverage of return statement [NRV]



------- Comment #16 from jbuck at gcc dot gnu dot org  2007-05-07 00:32 -------
The return statement, before the optimization, does two things; it causes a
copy constructor call, and it causes the function to return.  NVR eliminates
the copy constructor call, but the statement still returns.  At -O0, don't we
still hit a distinct return statement for the code at the given source line? 
The fact that there is also unexecuted code present that executes only if
exceptions are caught should not matter, because we mark a statement as covered
if any part of it executes.


-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=12076


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]