public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug objc/55840] New: valgrind errors in sparseset.h
@ 2013-01-01 14:56 tkoenig at gcc dot gnu.org
  2013-01-01 15:03 ` [Bug other/55840] " tkoenig at gcc dot gnu.org
  2013-01-02 10:36 ` [Bug middle-end/55840] " rguenth at gcc dot gnu.org
  0 siblings, 2 replies; 3+ messages in thread
From: tkoenig at gcc dot gnu.org @ 2013-01-01 14:56 UTC (permalink / raw)
  To: gcc-bugs


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

             Bug #: 55840
           Summary: valgrind errors in sparseset.h
    Classification: Unclassified
           Product: gcc
           Version: 4.8.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: objc
        AssignedTo: unassigned@gcc.gnu.org
        ReportedBy: tkoenig@gcc.gnu.org


Created attachment 29068
  --> http://gcc.gnu.org/bugzilla/attachment.cgi?id=29068
valgrind errors from test case in initial comment

Compiling the following test case with

COLLECT_GCC=gfortran
COLLECT_LTO_WRAPPER=/home/ig25/lib/gcc/x86_64-unknown-linux-gnu/4.8.0/lto-wrapper
Ziel: x86_64-unknown-linux-gnu
Konfiguriert mit: ../trunk/configure --prefix=/home/ig25
--enable-languages=c,fortran --with-mpfr=/usr/local --with-gmp=/usr/local
--with-mpc=/usr/local
Thread-Modell: posix
gcc-Version 4.8.0 20121231 (experimental) (GCC) 

module m_task
  implicit none
  private 
  public  tad_elemen, gele, vecino 
  !
  integer, parameter :: ngl = 3, nca = 4 
  !
  integer, dimension (nca)   :: koe, koi, koj
  integer, dimension (2*nca) :: coe, coi, coj
  !
  type tad_elemen
    integer, dimension (nca) :: iele
  end type tad_elemen
  type (tad_elemen), dimension (:), pointer :: gele 
  !
  contains
  !
  subroutine vecino (gele)
    type (tad_elemen), dimension (:), intent (inout) :: gele
    call troubletask (gele)
  end subroutine vecino
  !
  subroutine troubletask (gele)
    type (tad_elemen), dimension (:), intent (in):: gele
    integer :: nel, nci, ncj
    integer :: l1, l2, h1, h2
    integer :: lado, i, j
    !
    nel = size (gele,dim=1)
    do  i = 1, (nel - 1)
      koi = gele (i) % iele (1:nca)
      nci = count (koi>0)
      coi (1:2*nci) = [ koi(1:nci) , koi(1:nci) ]
      do  j = (i+1), nel
        koj = gele (j) % iele (1:nca)
        ncj = count (koj > 0)
        coj (1:2*ncj) = [ koj(1:ncj), koj(1:ncj) ]
        lado = 0
        !
        !problematic loops
        do  h1 = 1, nci
          if  (coi (h1) < 1) cycle   ! ICE if both are uncommented
          l1 = h1 + 1
          do  h2 = 1, ncj
            if  (coj (h2) < 1) cycle ! ICE if both are uncommented
            l2 = h2 + 1
            if  (coi (h1) == coj (l2) .and. coi (l1) == coj (h2)) then
              lado = 1
              exit
            end if
          end do ! h1
          if (lado == 1) exit
        end do ! h2
        !
      end do ! j
    end do ! i
    !
  end subroutine troubletask
  !
end module m_task
!
program test
  use m_task
  implicit none
  print *, "trace 1 "
  allocate (gele(10))
  call vecino (gele)
  print *, "trace 2 "
end program 

gets a lot of valgrind errors in sparseset.h, which are attached.

A few samples:

> <static-var>Assembling functions:
 vecino==6337== Conditional jump or move depends on uninitialised value(s)
==6337==    at 0xD70C6B: register_active_defs(df_ref_d**) (sparseset.h:147)
==6337==    by 0xD70D02: _ZL14update_df_initP7rtx_defS0_.isra.15 (fwprop.c:895)
==6337==    by 0xD71F1E: try_fwprop_subst(df_ref_d*, rtx_def**, rtx_def*,
rtx_def*, bool) (fwprop.c:963)
==6337==    by 0xD72388: forward_propagate_into(df_ref_d*) (fwprop.c:1337)
==6337==    by 0xD728C7: fwprop() (fwprop.c:1474)
==6337==    by 0x8C6D17: execute_one_pass(opt_pass*) (passes.c:2335)
==6337==    by 0x8C7124: execute_pass_list(opt_pass*) (passes.c:2383)
==6337==    by 0x8C7136: execute_pass_list(opt_pass*) (passes.c:2384)
==6337==    by 0x696791: expand_function(cgraph_node*) (cgraphunit.c:1641)
==6337==    by 0x698556: compile() (cgraphunit.c:1745)
==6337==    by 0x698BF9: finalize_compilation_unit() (cgraphunit.c:2120)
==6337==    by 0x861550: write_global_declarations() (langhooks.c:323)
==6337== 
==6337== Use of uninitialised value of size 8
==6337==    at 0xD70C70: register_active_defs(df_ref_d**) (sparseset.h:147)
==6337==    by 0xD70D02: _ZL14update_df_initP7rtx_defS0_.isra.15 (fwprop.c:895)
==6337==    by 0xD71F1E: try_fwprop_subst(df_ref_d*, rtx_def**, rtx_def*,
rtx_def*, bool) (fwprop.c:963)
==6337==    by 0xD72388: forward_propagate_into(df_ref_d*) (fwprop.c:1337)
==6337==    by 0xD728C7: fwprop() (fwprop.c:1474)
==6337==    by 0x8C6D17: execute_one_pass(opt_pass*) (passes.c:2335)
==6337==    by 0x8C7124: execute_pass_list(opt_pass*) (passes.c:2383)
==6337==    by 0x8C7136: execute_pass_list(opt_pass*) (passes.c:2384)
==6337==    by 0x696791: expand_function(cgraph_node*) (cgraphunit.c:1641)
==6337==    by 0x698556: compile() (cgraphunit.c:1745)
==6337==    by 0x698BF9: finalize_compilation_unit() (cgraphunit.c:2120)
==6337==    by 0x861550: write_global_declarations() (langhooks.c:323)


^ permalink raw reply	[flat|nested] 3+ messages in thread

* [Bug other/55840] valgrind errors in sparseset.h
  2013-01-01 14:56 [Bug objc/55840] New: valgrind errors in sparseset.h tkoenig at gcc dot gnu.org
@ 2013-01-01 15:03 ` tkoenig at gcc dot gnu.org
  2013-01-02 10:36 ` [Bug middle-end/55840] " rguenth at gcc dot gnu.org
  1 sibling, 0 replies; 3+ messages in thread
From: tkoenig at gcc dot gnu.org @ 2013-01-01 15:03 UTC (permalink / raw)
  To: gcc-bugs


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

Thomas Koenig <tkoenig at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
          Component|objc                        |other

--- Comment #1 from Thomas Koenig <tkoenig at gcc dot gnu.org> 2013-01-01 15:02:43 UTC ---
Reassigning to correct component.


^ permalink raw reply	[flat|nested] 3+ messages in thread

* [Bug middle-end/55840] valgrind errors in sparseset.h
  2013-01-01 14:56 [Bug objc/55840] New: valgrind errors in sparseset.h tkoenig at gcc dot gnu.org
  2013-01-01 15:03 ` [Bug other/55840] " tkoenig at gcc dot gnu.org
@ 2013-01-02 10:36 ` rguenth at gcc dot gnu.org
  1 sibling, 0 replies; 3+ messages in thread
From: rguenth at gcc dot gnu.org @ 2013-01-02 10:36 UTC (permalink / raw)
  To: gcc-bugs


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

Richard Biener <rguenth at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |RESOLVED
         Resolution|                            |INVALID

--- Comment #2 from Richard Biener <rguenth at gcc dot gnu.org> 2013-01-02 10:35:50 UTC ---
That's known and not a bug (there is a dup of this).


^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2013-01-02 10:36 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-01-01 14:56 [Bug objc/55840] New: valgrind errors in sparseset.h tkoenig at gcc dot gnu.org
2013-01-01 15:03 ` [Bug other/55840] " tkoenig at gcc dot gnu.org
2013-01-02 10:36 ` [Bug middle-end/55840] " rguenth at gcc dot gnu.org

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).