From 258ef00780344ea3565b3276a60343529e94acc3 Mon Sep 17 00:00:00 2001 From: Andreas Schwab Date: Sat, 13 Oct 2012 18:41:08 +0000 Subject: [PATCH] re PR gcov-profile/44728 (gcov chokes when "." is present in DIR argument to -o flag) PR gcov-profile/44728 * gcov.c (create_file_names): When stripping extension only look at base name. From-SVN: r192425 --- gcc/ChangeLog | 6 ++++++ gcc/gcov.c | 2 +- 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 000b0d2cfea..f961a99aa5a 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,9 @@ +2012-10-13 Andreas Schwab + + PR gcov-profile/44728 + * gcov.c (create_file_names): When stripping extension only look + at base name. + 2012-10-13 Jan Hubicka * loop-iv.c (determine_max_iter): Fix handling of AND. diff --git a/gcc/gcov.c b/gcc/gcov.c index cf26ce19a2c..09831c2c6d6 100644 --- a/gcc/gcov.c +++ b/gcc/gcov.c @@ -842,7 +842,7 @@ create_file_names (const char *file_name) } /* Remove the extension. */ - cptr = strrchr (name, '.'); + cptr = strrchr (CONST_CAST (char *, lbasename (name)), '.'); if (cptr) *cptr = 0;