This is the mail archive of the gcc@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]

Re: corrections to recent profile-arcs change


> > > FAIL: gcc.misc-tests/gcov-1.c (test for excess errors)
> > > WARNING: gcc.misc-tests/gcov-1.c compilation failed to produce executable
> > > FAIL: gcc.misc-tests/gcov-1.c gcov failed: Could not open data file gcov-1.da.
> > > Assuming that all execution counts are zero.
> > 
> > What hapepnds to the compilation? Why the executable is not produced?
> 
> All the C failures generated errors similar to this:
> 
> Executing on host: /xxx/gnu/gcc-3.2/objdir/gcc/xgcc -B/xxx/gnu/gcc-3.2/objdir/gc
> c/ /xxx/gnu/gcc-3.2/gcc/gcc/testsuite/gcc.misc-tests/gcov-1.c   -fprofile-arcs -
> ftest-coverage  -lm   -o ./gcov-1.exe    (timeout = 300)
> /var/tmp/ccd0q6hV.c:26: size of variable `*L$PBX0002' is too large
> collect2: gcc returned 1 exit status
> compiler exited with status 1
> output is:
> /var/tmp/ccd0q6hV.c:26: size of variable `*L$PBX0002' is too large
> collect2: gcc returned 1 exit status
> 
> FAIL: gcc.misc-tests/gcov-1.c (test for excess errors)
> Excess errors:
> /var/tmp/ccd0q6hV.c:26: size of variable `*L$PBX0002' is too large
> collect2: gcc returned 1 exit status
> 
> WARNING: gcc.misc-tests/gcov-1.c compilation failed to produce executable
> 
> This appears to be a problem with the .c file being generated by collect2.
> There aren't any errors in the initial compilation and we have the
> following definition for L$PBX0002:
> 
>         .align 8
> L$PBX0002
>         .blockz 40

I see, this is underflow for maximal value of zero sized array.
Does the attached patch solve your problem?

Sat May 12 18:20:36 CEST 2001  Jan Hubicka  <jh@suse.cz>
	* final.c (end_final): Do not output profile_arcs constructor, when
	no functions are instrumented.

*** final.c.old	Sun May 12 19:35:30 2002
--- final.c	Sun May 12 19:35:41 2002
*************** void
*** 252,258 ****
  end_final (filename)
       const char *filename;
  {
!   if (profile_arc_flag)
      {
        char name[20];
        tree char_pointer_type, char_array_type, string_type, string_cst;
--- 252,258 ----
  end_final (filename)
       const char *filename;
  {
!   if (profile_arc_flag && profile_info.count_instrumented_edges)
      {
        char name[20];
        tree char_pointer_type, char_array_type, string_type, string_cst;


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