[Bug gcov-profile/78086] FAIL: gcc.misc-tests/gcov-1.c, etc

2016-11-25 Thread marxin at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=78086

Martin Liška  changed:

   What|Removed |Added

 Status|NEW |RESOLVED
 Resolution|--- |FIXED

--- Comment #10 from Martin Liška  ---
Fixed.

[Bug gcov-profile/78086] FAIL: gcc.misc-tests/gcov-1.c, etc

2016-11-25 Thread marxin at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=78086

--- Comment #9 from Martin Liška  ---
Author: marxin
Date: Fri Nov 25 14:23:25 2016
New Revision: 242877

URL: https://gcc.gnu.org/viewcvs?rev=242877=gcc=rev
Log:
Don't use priority {cd}tors if not supported by a target (PR

PR gcov-profile/78086
* g++.dg/gcov/pr16855.C: Clean up the test case.
* g++.dg/gcov/pr16855-priority.C: New test.
* coverage.c (build_init_ctor): Don't use priority {cd}tors if
not supported by a target.  Set priority to 100 if possible.
(build_gcov_exit_decl): Likewise.

Added:
trunk/gcc/testsuite/g++.dg/gcov/pr16855-priority.C
Modified:
trunk/gcc/ChangeLog
trunk/gcc/coverage.c
trunk/gcc/testsuite/ChangeLog
trunk/gcc/testsuite/g++.dg/gcov/pr16855.C

[Bug gcov-profile/78086] FAIL: gcc.misc-tests/gcov-1.c, etc

2016-10-31 Thread marxin at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=78086

--- Comment #8 from Martin Liška  ---
Thanks for testing. Patch has been just sent to ML:
https://gcc.gnu.org/ml/gcc-patches/2016-10/msg02439.html

[Bug gcov-profile/78086] FAIL: gcc.misc-tests/gcov-1.c, etc

2016-10-29 Thread danglin at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=78086

--- Comment #7 from John David Anglin  ---
The proposed patch fixes all the gcov tests.

[Bug gcov-profile/78086] FAIL: gcc.misc-tests/gcov-1.c, etc

2016-10-26 Thread dave.anglin at bell dot net
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=78086

--- Comment #6 from dave.anglin at bell dot net ---
On 2016-10-26 7:08 AM, marxin at gcc dot gnu.org wrote:
> May I please ask you for testing the patch on your hppa64 machine?
Testing.

Thanks,
Dave

[Bug gcov-profile/78086] FAIL: gcc.misc-tests/gcov-1.c, etc

2016-10-26 Thread marxin at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=78086

--- Comment #5 from Martin Liška  ---
Created attachment 39886
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=39886=edit
Untested patch

May I please ask you for testing the patch on your hppa64 machine?

[Bug gcov-profile/78086] FAIL: gcc.misc-tests/gcov-1.c, etc

2016-10-26 Thread marxin at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=78086

Martin Liška  changed:

   What|Removed |Added

 Status|WAITING |NEW
   Assignee|unassigned at gcc dot gnu.org  |marxin at gcc dot 
gnu.org

--- Comment #4 from Martin Liška  ---
Ok, thanks for the analysis. I'm going to prepare a patch that would not emmit
priority ctors/dtors in case a target does not support it.

[Bug gcov-profile/78086] FAIL: gcc.misc-tests/gcov-1.c, etc

2016-10-25 Thread dave.anglin at bell dot net
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=78086

--- Comment #3 from dave.anglin at bell dot net ---
On 2016-10-25, at 8:29 AM, dave.anglin at bell dot net wrote:

>> However, 'cannot open data file, assuming not executed' message is very
>> suspicious.
> 
> The .gcda files are not being generated.  Investigating.

The problem was introduced in r240529:

2016-09-27  Martin Liska  

PR gcov-profile/7970
PR gcov-profile/16855
PR gcov-profile/44779
* coverage.c (build_gcov_exit_decl): New function.
(coverage_obj_init): Call the function and generate __gcov_exit
destructor.
* doc/gcov.texi: Document when __gcov_exit function is called.

It appears to be issue with constructors/destructors.  With gcc-6, we had:

.section.ctors,"aw",@progbits
.align 8
.dword  P%_GLOBAL__sub_I_65535_0_noop

_GLOBAL__sub_I_65535_0_noop is called.

With r240529, we have:

.section.ctors.1,"aw",@progbits
.align 8
.dword  P%_GLOBAL__sub_I_65534_0_noop
[...]
.section.dtors.1,"aw",@progbits
.align 8
.dword  P%_GLOBAL__sub_D_65534_1_noop

 Neither the constructor or destructor is called.

It looks to me like the priority change has changed the constructor section:

default_named_section_asm_out_constructor (rtx symbol, int priority)
{
  section *sec;

  if (priority != DEFAULT_INIT_PRIORITY)
sec = get_cdtor_priority_section (priority,
  /*constructor_p=*/true);
  else
sec = get_section (".ctors", SECTION_WRITE, NULL);

  assemble_addr_to_section (symbol, sec);
}

Probably, defining CTORS_SECTION_ASM_OP and DTORS_SECTION_ASM_OP will fix.
On the other hand, I think SUPPORTS_INIT_PRIORITY is 0.

--
John David Anglin   dave.ang...@bell.net

[Bug gcov-profile/78086] FAIL: gcc.misc-tests/gcov-1.c, etc

2016-10-25 Thread dave.anglin at bell dot net
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=78086

--- Comment #2 from dave.anglin at bell dot net ---
On 2016-10-24, at 4:53 AM, marxin at gcc dot gnu.org wrote:

> However, 'cannot open data file, assuming not executed' message is very
> suspicious.

The .gcda files are not being generated.  Investigating.

--
John David Anglin   dave.ang...@bell.net

[Bug gcov-profile/78086] FAIL: gcc.misc-tests/gcov-1.c, etc

2016-10-24 Thread marxin at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=78086

Martin Liška  changed:

   What|Removed |Added

 Status|UNCONFIRMED |WAITING
   Last reconfirmed||2016-10-24
 CC||marxin at gcc dot gnu.org
 Ever confirmed|0   |1

--- Comment #1 from Martin Liška  ---
I would like to reproduce the problem, however we don't have any hppa64 in
Compile farm.

However, 'cannot open data file, assuming not executed' message is very
suspicious. Can you please run tests in verbose mode to isolate the problem?