2017-04-28 Martin Liska <mliska@suse.cz>
PR gcov-profile/53915
* gcov.c (format_gcov): Print 'NAN %' when top > bottom.
From-SVN: r247375
2017-04-28 Martin Liska <mliska@suse.cz>
+ PR gcov-profile/53915
+ * gcov.c (format_gcov): Print 'NAN %' when top > bottom.
+
+2017-04-28 Martin Liska <mliska@suse.cz>
+
PR gcov-profile/79891
* gcov.c (add_line_counts): Assign BBs to lines just if the BB
is marked by compiler as living on a line.
{
static char buffer[20];
+ /* Handle invalid values that would result in a misleading value. */
+ if (bottom != 0 && top > bottom && dp >= 0)
+ {
+ sprintf (buffer, "NAN %%");
+ return buffer;
+ }
+
if (dp >= 0)
{
float ratio = bottom ? (float)top / bottom : 0;