public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug fortran/51520] New: ICE in gfortran 4.6.2, x86_64
@ 2011-12-12 22:54 adrian at llnl dot gov
  2011-12-12 23:21 ` [Bug fortran/51520] [4.6 Regression] " dominiq at lps dot ens.fr
                   ` (8 more replies)
  0 siblings, 9 replies; 10+ messages in thread
From: adrian at llnl dot gov @ 2011-12-12 22:54 UTC (permalink / raw)
  To: gcc-bugs

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

             Bug #: 51520
           Summary: ICE in gfortran 4.6.2, x86_64
    Classification: Unclassified
           Product: gcc
           Version: 4.6.2
            Status: UNCONFIRMED
          Severity: major
          Priority: P3
         Component: fortran
        AssignedTo: unassigned@gcc.gnu.org
        ReportedBy: adrian@llnl.gov


I'm getting an ICE in gfortran 4.6.2 .
The machine is running Ubuntu 10.04, 64 bit on an Intel Xeon.

  $ gfortran -I. -O0  -c -o test.o test.f03 

  test.f03: In function ‘evalresa’:
  test.f03:40:0: internal compiler error: Segmentation fault
  Please submit a full bug report,
  with preprocessed source if appropriate.
  See <http://gcc.gnu.org/bugs.html> for instructions.

below is the nonsensical delta-reduced test program:

test.f03 
=======================================================
module sidl
  use, intrinsic :: iso_c_binding
  enum, bind(c)
    enumerator :: sidl_row_major_order = 2
  end enum
  interface
  end interface
contains
  logical function sidl_opaque_is_null_p (opaq) 
  end function sidl_opaque_is_null_p
end module sidl
module sidl_array_type
  use sidl
  type sidl__array
    type(c_ptr) :: d_array = c_null_ptr
  end type sidl__array
end module sidl_array_type
module sidl_array_array_F03
  use sidl_array_type
  interface is_null
    module procedure is_null_p
  end interface
contains
  logical function is_null_p(array)
    type(sidl__array), intent(in) :: array
  end function is_null_p
end module sidl_array_array_F03
module vect_Utils_F03
  use sidl_array_array_F03
  type vect_Utils_t
  end type vect_Utils_t
  interface is_null
    module procedure is_null_s
end interface
contains
  logical function is_null_s(ext)
    class(vect_Utils_t), intent(in) :: ext
  end function is_null_s
end module vect_Utils_F03
subroutine evalResA(tracker, partNum, res, expected, tol, okay)
  use vect_Utils_F03
  type (sidl__array) :: res, expected
  if (.not. is_null(res)) then
  endif
end subroutine evalResA
subroutine runProduct(tracker, partNum, a, u, tol, badLvl, res, okay,
expectExc, desc)
    if (expectExc .eq. NoneExp) then
      call evalResA(tracker, partNum, x, res, tol, okay)
    endif
end subroutine runProduct
program vectortest
  call runProduct(tracker, partNum, ZERO, n, TOL, NoVio, n, .true., NoneExp,&
   'passing vuProduct() a null array - no precondition vio        ')
end program vectortest
=========================================================

valgrind output:

==18442== Invalid read of size 1
==18442==    at 0x5F49EE: mpz_get_double_int (double-int.c:1145)
==18442==    by 0x550521: gfc_conv_mpz_to_tree (trans-const.c:204)
==18442==    by 0x550D2F: gfc_conv_constant (trans-const.c:396)
==18442==    by 0x5650FB: gfc_conv_initializer (trans-expr.c:4155)
==18442==    by 0x55D80B: gfc_conv_structure (trans-expr.c:4666)
==18442==    by 0x5651EB: gfc_conv_initializer (trans-expr.c:4197)
==18442==    by 0x554620: gfc_get_symbol_decl (trans-decl.c:1379)
==18442==    by 0x554C2F: generate_local_decl (trans-decl.c:4161)
==18442==    by 0x52BD26: traverse_ns (symbol.c:3333)
==18442==    by 0x52BD15: traverse_ns (symbol.c:3330)
==18442==    by 0x52BD15: traverse_ns (symbol.c:3330)
==18442==    by 0x52BD15: traverse_ns (symbol.c:3330)
==18442==  Address 0x2 is not stack'd, malloc'd or (recently) free'd
==18442== 
test.f03: In function ‘evalresa’:
test.f03:40:0: internal compiler error: Segmentation fault
Please submit a full bug report,
with preprocessed source if appropriate.
See <http://gcc.gnu.org/bugs.html> for instructions.
==18442== 
==18442== HEAP SUMMARY:
==18442==     in use at exit: 868,466 bytes in 3,301 blocks
==18442==   total heap usage: 8,088 allocs, 4,787 frees, 1,634,007 bytes
allocated
==18442== 
==18442== LEAK SUMMARY:
==18442==    definitely lost: 12,428 bytes in 74 blocks
==18442==    indirectly lost: 3,496 bytes in 5 blocks
==18442==      possibly lost: 352 bytes in 18 blocks
==18442==    still reachable: 852,190 bytes in 3,204 blocks
==18442==         suppressed: 0 bytes in 0 blocks
==18442== Rerun with --leak-check=full to see details of leaked memory
==18442== 
==18442== For counts of detected and suppressed errors, rerun with: -v
==18442== ERROR SUMMARY: 1 errors from 1 contexts (suppressed: 4 from 4)
==18439== 
==18439== HEAP SUMMARY:
==18439==     in use at exit: 32,293 bytes in 86 blocks
==18439==   total heap usage: 502 allocs, 416 frees, 61,072 bytes allocated
==18439== 
==18439== LEAK SUMMARY:
==18439==    definitely lost: 5,444 bytes in 29 blocks
==18439==    indirectly lost: 45 bytes in 3 blocks
==18439==      possibly lost: 29 bytes in 2 blocks
==18439==    still reachable: 26,775 bytes in 52 blocks
==18439==         suppressed: 0 bytes in 0 blocks
==18439== Rerun with --leak-check=full to see details of leaked memory
==18439== 
==18439== For counts of detected and suppressed errors, rerun with: -v
==18439== ERROR SUMMARY: 0 errors from 0 contexts (suppressed: 4 from 4)


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

* [Bug fortran/51520] [4.6 Regression] ICE in gfortran 4.6.2, x86_64
  2011-12-12 22:54 [Bug fortran/51520] New: ICE in gfortran 4.6.2, x86_64 adrian at llnl dot gov
@ 2011-12-12 23:21 ` dominiq at lps dot ens.fr
  2011-12-13  8:49 ` burnus at gcc dot gnu.org
                   ` (7 subsequent siblings)
  8 siblings, 0 replies; 10+ messages in thread
From: dominiq at lps dot ens.fr @ 2011-12-12 23:21 UTC (permalink / raw)
  To: gcc-bugs

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

Dominique d'Humieres <dominiq at lps dot ens.fr> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |NEW
   Last reconfirmed|                            |2011-12-12
            Summary|ICE in gfortran 4.6.2,      |[4.6 Regression] ICE in
                   |x86_64                      |gfortran 4.6.2, x86_64
     Ever Confirmed|0                           |1

--- Comment #1 from Dominique d'Humieres <dominiq at lps dot ens.fr> 2011-12-12 23:12:17 UTC ---
The test compiles with gfortran 4.5.3. The segmentation fault appears on 4.6
between revisions 166401 (OK) and 166533 (ICE). The ICE seems to have been
fixed on trunk between revisions 180989 (ICE) and 181881 (OK).


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

* [Bug fortran/51520] [4.6 Regression] ICE in gfortran 4.6.2, x86_64
  2011-12-12 22:54 [Bug fortran/51520] New: ICE in gfortran 4.6.2, x86_64 adrian at llnl dot gov
  2011-12-12 23:21 ` [Bug fortran/51520] [4.6 Regression] " dominiq at lps dot ens.fr
@ 2011-12-13  8:49 ` burnus at gcc dot gnu.org
  2011-12-13  9:19 ` burnus at gcc dot gnu.org
                   ` (6 subsequent siblings)
  8 siblings, 0 replies; 10+ messages in thread
From: burnus at gcc dot gnu.org @ 2011-12-13  8:49 UTC (permalink / raw)
  To: gcc-bugs

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

Tobias Burnus <burnus at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |burnus at gcc dot gnu.org
   Target Milestone|---                         |4.6.3


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

* [Bug fortran/51520] [4.6 Regression] ICE in gfortran 4.6.2, x86_64
  2011-12-12 22:54 [Bug fortran/51520] New: ICE in gfortran 4.6.2, x86_64 adrian at llnl dot gov
  2011-12-12 23:21 ` [Bug fortran/51520] [4.6 Regression] " dominiq at lps dot ens.fr
  2011-12-13  8:49 ` burnus at gcc dot gnu.org
@ 2011-12-13  9:19 ` burnus at gcc dot gnu.org
  2011-12-13 12:55 ` dominiq at lps dot ens.fr
                   ` (5 subsequent siblings)
  8 siblings, 0 replies; 10+ messages in thread
From: burnus at gcc dot gnu.org @ 2011-12-13  9:19 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #2 from Tobias Burnus <burnus at gcc dot gnu.org> 2011-12-13 09:18:04 UTC ---
(In reply to comment #0)
> valgrind output:
> ==18442==    by 0x52BD26: traverse_ns (symbol.c:3333)

(In reply to comment #1)
> The ICE seems to have been fixed on trunk between revisions 180989 (ICE)
> and 181881 (OK).

One possibility could be:

r181232 | burnus | 2011-11-09 20:36:54 +0100 (Wed, 09 Nov 2011) | 7 lines
        * symbol.c (clear_sym_mark, traverse_ns): Remove functions.
        (count_st_nodes, do_traverse_symtree, fill_st_vector): New functions.
        (gfc_traverse_symtree, gfc_traverse_ns): Call do_traverse_symtree.

At least I hope for some smaller patch than the big constructor patch (Rev.
181425).

Dominique: Any chance that you could bisect the 4.7 trunk to find the patch
which fixes the ICE? If not, I can do so later. (You might want to use
--disable-bootstrap --disable-build-poststage1-with-cxx and not building C++ to
speed up the bisecting.)


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

* [Bug fortran/51520] [4.6 Regression] ICE in gfortran 4.6.2, x86_64
  2011-12-12 22:54 [Bug fortran/51520] New: ICE in gfortran 4.6.2, x86_64 adrian at llnl dot gov
                   ` (2 preceding siblings ...)
  2011-12-13  9:19 ` burnus at gcc dot gnu.org
@ 2011-12-13 12:55 ` dominiq at lps dot ens.fr
  2012-01-12 10:08 ` burnus at gcc dot gnu.org
                   ` (4 subsequent siblings)
  8 siblings, 0 replies; 10+ messages in thread
From: dominiq at lps dot ens.fr @ 2011-12-13 12:55 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #3 from Dominique d'Humieres <dominiq at lps dot ens.fr> 2011-12-13 12:49:31 UTC ---
> At least I hope for some smaller patch than the big constructor patch (Rev.
> 181425).

Sadly enough, this pr has been fixed by r181425 (r181424 gives the ICE).


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

* [Bug fortran/51520] [4.6 Regression] ICE in gfortran 4.6.2, x86_64
  2011-12-12 22:54 [Bug fortran/51520] New: ICE in gfortran 4.6.2, x86_64 adrian at llnl dot gov
                   ` (3 preceding siblings ...)
  2011-12-13 12:55 ` dominiq at lps dot ens.fr
@ 2012-01-12 10:08 ` burnus at gcc dot gnu.org
  2012-03-01 15:29 ` jakub at gcc dot gnu.org
                   ` (3 subsequent siblings)
  8 siblings, 0 replies; 10+ messages in thread
From: burnus at gcc dot gnu.org @ 2012-01-12 10:08 UTC (permalink / raw)
  To: gcc-bugs

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

Tobias Burnus <burnus at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
           Keywords|                            |ice-on-valid-code

--- Comment #4 from Tobias Burnus <burnus at gcc dot gnu.org> 2012-01-12 10:07:47 UTC ---
Further reduced test case. Seems to be related to c_ptr/c_null_ptr. Maybe some
parts of Rev. 181425 iso_c_binding related changes in symbol.c are sufficient?

module sidl_array_array_F03
  use iso_c_binding
  type sidl__array
    type(c_ptr) :: a = c_null_ptr
  end type sidl__array
end module sidl_array_array_F03

module vect_Utils_F03
  use sidl_array_array_F03
contains
  subroutine is_null_s(ext)
    class(sidl__array), intent(in) :: ext
  end subroutine is_null_s
end module vect_Utils_F03

subroutine evalResA(res)
  use vect_Utils_F03
  type (sidl__array) :: res
  call is_null_s(res)
end subroutine evalResA


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

* [Bug fortran/51520] [4.6 Regression] ICE in gfortran 4.6.2, x86_64
  2011-12-12 22:54 [Bug fortran/51520] New: ICE in gfortran 4.6.2, x86_64 adrian at llnl dot gov
                   ` (4 preceding siblings ...)
  2012-01-12 10:08 ` burnus at gcc dot gnu.org
@ 2012-03-01 15:29 ` jakub at gcc dot gnu.org
  2012-11-24 13:14 ` [Bug fortran/51520] [4.6 Regression] ICE in gfortran 4.6.x janus at gcc dot gnu.org
                   ` (2 subsequent siblings)
  8 siblings, 0 replies; 10+ messages in thread
From: jakub at gcc dot gnu.org @ 2012-03-01 15:29 UTC (permalink / raw)
  To: gcc-bugs

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

Jakub Jelinek <jakub at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
   Target Milestone|4.6.3                       |4.6.4

--- Comment #5 from Jakub Jelinek <jakub at gcc dot gnu.org> 2012-03-01 14:39:26 UTC ---
GCC 4.6.3 is being released.


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

* [Bug fortran/51520] [4.6 Regression] ICE in gfortran 4.6.x
  2011-12-12 22:54 [Bug fortran/51520] New: ICE in gfortran 4.6.2, x86_64 adrian at llnl dot gov
                   ` (5 preceding siblings ...)
  2012-03-01 15:29 ` jakub at gcc dot gnu.org
@ 2012-11-24 13:14 ` janus at gcc dot gnu.org
  2012-11-24 14:13 ` janus at gcc dot gnu.org
  2013-02-15  7:46 ` burnus at gcc dot gnu.org
  8 siblings, 0 replies; 10+ messages in thread
From: janus at gcc dot gnu.org @ 2012-11-24 13:14 UTC (permalink / raw)
  To: gcc-bugs


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

janus at gcc dot gnu.org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |janus at gcc dot gnu.org
            Summary|[4.6 Regression] ICE in     |[4.6 Regression] ICE in
                   |gfortran 4.6.2, x86_64      |gfortran 4.6.x

--- Comment #6 from janus at gcc dot gnu.org 2012-11-24 13:14:22 UTC ---
Slightly further reduced test case:


module sidl_array_array_F03
  use iso_c_binding
  type sidl__array
    type(c_ptr) :: a = c_null_ptr
  end type
end module

  use sidl_array_array_F03
  type (sidl__array) :: res
  call is_null_s(res)
contains
  subroutine is_null_s(ext)
    class(sidl__array) :: ext
  end subroutine
end


Still segfaults with the current 4.6 branch version:

gcc version 4.6.4 20121124 (prerelease) [gcc-4_6-branch revision 193777] (GCC)


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

* [Bug fortran/51520] [4.6 Regression] ICE in gfortran 4.6.x
  2011-12-12 22:54 [Bug fortran/51520] New: ICE in gfortran 4.6.2, x86_64 adrian at llnl dot gov
                   ` (6 preceding siblings ...)
  2012-11-24 13:14 ` [Bug fortran/51520] [4.6 Regression] ICE in gfortran 4.6.x janus at gcc dot gnu.org
@ 2012-11-24 14:13 ` janus at gcc dot gnu.org
  2013-02-15  7:46 ` burnus at gcc dot gnu.org
  8 siblings, 0 replies; 10+ messages in thread
From: janus at gcc dot gnu.org @ 2012-11-24 14:13 UTC (permalink / raw)
  To: gcc-bugs


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

--- Comment #7 from janus at gcc dot gnu.org 2012-11-24 14:12:47 UTC ---
*** Bug 52679 has been marked as a duplicate of this bug. ***


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

* [Bug fortran/51520] [4.6 Regression] ICE in gfortran 4.6.x
  2011-12-12 22:54 [Bug fortran/51520] New: ICE in gfortran 4.6.2, x86_64 adrian at llnl dot gov
                   ` (7 preceding siblings ...)
  2012-11-24 14:13 ` janus at gcc dot gnu.org
@ 2013-02-15  7:46 ` burnus at gcc dot gnu.org
  8 siblings, 0 replies; 10+ messages in thread
From: burnus at gcc dot gnu.org @ 2013-02-15  7:46 UTC (permalink / raw)
  To: gcc-bugs


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

Tobias Burnus <burnus at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |RESOLVED
                 CC|                            |burnus at gcc dot gnu.org
         Resolution|                            |WONTFIX

--- Comment #8 from Tobias Burnus <burnus at gcc dot gnu.org> 2013-02-15 07:45:58 UTC ---
I close this now as WONTFIX.

Given that it works in the current release 4.7.x and in the
very-soon-to-be-released 4.8, it is simply very unlikely that anyone will work
on this PR.

Thanks for reporting the bug – and sorry for both the breakage and for not
fixing it. I hope that using GCC 4.7/4.8 is an alternative.


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

end of thread, other threads:[~2013-02-15  7:46 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-12-12 22:54 [Bug fortran/51520] New: ICE in gfortran 4.6.2, x86_64 adrian at llnl dot gov
2011-12-12 23:21 ` [Bug fortran/51520] [4.6 Regression] " dominiq at lps dot ens.fr
2011-12-13  8:49 ` burnus at gcc dot gnu.org
2011-12-13  9:19 ` burnus at gcc dot gnu.org
2011-12-13 12:55 ` dominiq at lps dot ens.fr
2012-01-12 10:08 ` burnus at gcc dot gnu.org
2012-03-01 15:29 ` jakub at gcc dot gnu.org
2012-11-24 13:14 ` [Bug fortran/51520] [4.6 Regression] ICE in gfortran 4.6.x janus at gcc dot gnu.org
2012-11-24 14:13 ` janus at gcc dot gnu.org
2013-02-15  7:46 ` burnus 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).