public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug fortran/52332] New: Internal compiler error in in gfc_get_symbol_decl
@ 2012-02-21 23:09 fmartinez at gmv dot com
  2012-02-21 23:47 ` [Bug fortran/52332] " burnus at gcc dot gnu.org
                   ` (8 more replies)
  0 siblings, 9 replies; 10+ messages in thread
From: fmartinez at gmv dot com @ 2012-02-21 23:09 UTC (permalink / raw)
  To: gcc-bugs

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

             Bug #: 52332
           Summary: Internal compiler error in in gfc_get_symbol_decl
    Classification: Unclassified
           Product: gcc
           Version: 4.7.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: fortran
        AssignedTo: unassigned@gcc.gnu.org
        ReportedBy: fmartinez@gmv.com


Created attachment 26720
  --> http://gcc.gnu.org/bugzilla/attachment.cgi?id=26720
Sample code for bug

The attached code produces the following fatal error

m_xfunit_assertion_array_character.f90: In function ‘get_expected’:
m_xfunit_assertion_array_character.f90:179:0: internal compiler error: in
gfc_get_symbol_decl, at fortran/trans-decl.c:1234
Please submit a full bug report, 
with preprocessed source if appropriate.
See <http://gcc.gnu.org/bugs.html> for instructions.


The command line is:

/opt/gcc-4.7/bin/gfortran -c m_string.F90 m_xfunit_tools.f90 m_xfunit_xml.f90
m_xfunit_assertion.f90 m_xfunit_assertion_character.f90
m_xfunit_assertion_array_character.f90


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

* [Bug fortran/52332] Internal compiler error in in gfc_get_symbol_decl
  2012-02-21 23:09 [Bug fortran/52332] New: Internal compiler error in in gfc_get_symbol_decl fmartinez at gmv dot com
@ 2012-02-21 23:47 ` burnus at gcc dot gnu.org
  2013-06-10 22:07 ` dominiq at lps dot ens.fr
                   ` (7 subsequent siblings)
  8 siblings, 0 replies; 10+ messages in thread
From: burnus at gcc dot gnu.org @ 2012-02-21 23:47 UTC (permalink / raw)
  To: gcc-bugs

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

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

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

--- Comment #1 from Tobias Burnus <burnus at gcc dot gnu.org> 2012-02-21 23:07:43 UTC ---
Fails for:

pure function get_expected( ast ) result(res)
  class(t_xfunit_assertion_array_character), intent(in) :: ast
  character, dimension(size(ast%rast)) :: res
  integer :: i
  res = (/ (character(ast%rast(i)%get_expected()), i=1, size(ast%rast)) /)
end function get_expected


Hereby, character is a generic name for the specific function (in
m_string.F90):

elemental function string_to_char( s ) result(res)
  type(t_string),    intent(in) :: s
#if defined(__G95__) || defined(__GFORTRAN__)
  character(len=size(s%string)) :: res
#endif


The failue is for "s" at the assert:

      /* Dummy variables should already have been created.  */
      gcc_assert (sym->backend_decl);

#0  gfc_get_symbol_decl (sym=0x177cfe0) at
/home/tob/projects/gcc-trunk-checkout/gcc/fortran/trans-decl.c:1234
#1  0x00000000005db598 in gfc_conv_variable (se=0x7fffffffc850, expr=0x1768930)
    at trans-expr.c:1196
#2  0x00000000005dbd19 in gfc_conv_expr_lhs (se=0x7fffffffc850, expr=0x1768930)
    at trans-expr.c:5542

If one looks at the expr, one sees that there is a REF_COMPONENT followed by a
REF_ARRAY.

(gdb) p ((gfc_expr *)0x1768930)->ref->u.c->sym->name
$2 = 0x2aaaaccdbf30 "t_string"
(gdb) p ((gfc_expr *)0x1768930)->ref->u.c->component->name
$5 = 0x2aaaacd10048 "string"


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

* [Bug fortran/52332] Internal compiler error in in gfc_get_symbol_decl
  2012-02-21 23:09 [Bug fortran/52332] New: Internal compiler error in in gfc_get_symbol_decl fmartinez at gmv dot com
  2012-02-21 23:47 ` [Bug fortran/52332] " burnus at gcc dot gnu.org
@ 2013-06-10 22:07 ` dominiq at lps dot ens.fr
  2015-09-10  9:52 ` dominiq at lps dot ens.fr
                   ` (6 subsequent siblings)
  8 siblings, 0 replies; 10+ messages in thread
From: dominiq at lps dot ens.fr @ 2013-06-10 22:07 UTC (permalink / raw)
  To: gcc-bugs

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

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

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |NEW
   Last reconfirmed|                            |2013-06-10
     Ever confirmed|0                           |1

--- Comment #2 from Dominique d'Humieres <dominiq at lps dot ens.fr> ---
Self contained reduced test

module m_xfunit_assertion_character
  implicit none
  private
  public t_string, character, t_xfunit_assertion, t_xfunit_assertion_character

  type t_string
    private
    character, dimension(:), allocatable :: string      ! String buffer
    integer                              :: length = 0  ! String length
    integer                              :: size   = 0  ! Total buffer size
  end type t_string

  type, abstract :: t_xfunit_assertion
  end type t_xfunit_assertion

  type, extends(t_xfunit_assertion) :: t_xfunit_assertion_character
    private
    contains
      procedure :: get_expected
  end type t_xfunit_assertion_character

  interface character
    module procedure string_to_char
  end interface character

contains

elemental function string_to_char( s ) result(res)
  type(t_string),    intent(in) :: s
  character(len=size(s%string)) :: res
end function string_to_char

pure function get_expected( ast ) result(res)
  class(t_xfunit_assertion_character), intent(in) :: ast
  type(t_string) :: res
end function get_expected

end module m_xfunit_assertion_character

module m_xfunit_assertion_array_character
  use m_xfunit_assertion_character
  implicit none
  private
  public t_xfunit_assertion_array_character

  type, extends(t_xfunit_assertion) :: t_xfunit_assertion_array_character
    private
      type(t_xfunit_assertion_character), dimension(:), allocatable :: rast
    contains
      procedure :: get_expected
  end type t_xfunit_assertion_array_character

contains

pure function get_expected( ast ) result(res)
  class(t_xfunit_assertion_array_character), intent(in) :: ast
  character, dimension(size(ast%rast)) :: res
  integer :: i
  res = (/ (character(ast%rast(i)%get_expected()), i=1, size(ast%rast)) /)
end function get_expected

end module m_xfunit_assertion_array_character


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

* [Bug fortran/52332] Internal compiler error in in gfc_get_symbol_decl
  2012-02-21 23:09 [Bug fortran/52332] New: Internal compiler error in in gfc_get_symbol_decl fmartinez at gmv dot com
  2012-02-21 23:47 ` [Bug fortran/52332] " burnus at gcc dot gnu.org
  2013-06-10 22:07 ` dominiq at lps dot ens.fr
@ 2015-09-10  9:52 ` dominiq at lps dot ens.fr
  2015-09-10  9:54 ` dominiq at lps dot ens.fr
                   ` (5 subsequent siblings)
  8 siblings, 0 replies; 10+ messages in thread
From: dominiq at lps dot ens.fr @ 2015-09-10  9:52 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=52332

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

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |walt.brainerd at gmail dot com

--- Comment #4 from Dominique d'Humieres <dominiq at lps dot ens.fr> ---
*** Bug 60110 has been marked as a duplicate of this bug. ***


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

* [Bug fortran/52332] Internal compiler error in in gfc_get_symbol_decl
  2012-02-21 23:09 [Bug fortran/52332] New: Internal compiler error in in gfc_get_symbol_decl fmartinez at gmv dot com
                   ` (2 preceding siblings ...)
  2015-09-10  9:52 ` dominiq at lps dot ens.fr
@ 2015-09-10  9:54 ` dominiq at lps dot ens.fr
  2015-10-02  4:04 ` lkrupp at gcc dot gnu.org
                   ` (4 subsequent siblings)
  8 siblings, 0 replies; 10+ messages in thread
From: dominiq at lps dot ens.fr @ 2015-09-10  9:54 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=52332

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

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |Joost.VandeVondele at mat dot ethz
                   |                            |.ch

--- Comment #5 from Dominique d'Humieres <dominiq at lps dot ens.fr> ---
*** Bug 62246 has been marked as a duplicate of this bug. ***


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

* [Bug fortran/52332] Internal compiler error in in gfc_get_symbol_decl
  2012-02-21 23:09 [Bug fortran/52332] New: Internal compiler error in in gfc_get_symbol_decl fmartinez at gmv dot com
                   ` (3 preceding siblings ...)
  2015-09-10  9:54 ` dominiq at lps dot ens.fr
@ 2015-10-02  4:04 ` lkrupp at gcc dot gnu.org
  2015-10-02  6:01 ` Joost.VandeVondele at mat dot ethz.ch
                   ` (3 subsequent siblings)
  8 siblings, 0 replies; 10+ messages in thread
From: lkrupp at gcc dot gnu.org @ 2015-10-02  4:04 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=52332

--- Comment #6 from lkrupp at gcc dot gnu.org ---
Author: lkrupp
Date: Fri Oct  2 04:03:34 2015
New Revision: 228368

URL: https://gcc.gnu.org/viewcvs?rev=228368&root=gcc&view=rev
Log:
2015-10-01  Louis Krupp <louis.krupp@zoho.com>

        PR fortran/62242
        PR fortran/52332
        * trans-array.c
        (store_backend_decl): Create new gfc_charlen instance if requested
        (get_array_ctor_all_strlen): Call store_backend_decl requesting
        new gfc_charlen
        (trans_array_constructor): Call store_backend_decl requesting
        new gfc_charlen if get_array_ctor_strlen was called
        (gfc_add_loop_ss_code): Don't try to convert non-constant length

2015-10-01  Louis Krupp     <louis.krupp@zoho.com>

        PR fortran/62242
        PR fortran/52332
        * gfortran.dg/string_array_constructor_1.f90: New.
        * gfortran.dg/string_array_constructor_2.f90: New.
        * gfortran.dg/string_array_constructor_3.f90: New.

Added:
    trunk/gcc/testsuite/gfortran.dg/string_array_constructor_1.f90   (with
props)
    trunk/gcc/testsuite/gfortran.dg/string_array_constructor_2.f90   (with
props)
    trunk/gcc/testsuite/gfortran.dg/string_array_constructor_3.f90
Modified:
    trunk/gcc/fortran/ChangeLog
    trunk/gcc/fortran/trans-array.c
    trunk/gcc/testsuite/ChangeLog

Propchange: trunk/gcc/testsuite/gfortran.dg/string_array_constructor_1.f90
            ('svn:executable' added)

Propchange: trunk/gcc/testsuite/gfortran.dg/string_array_constructor_2.f90
            ('svn:executable' added)


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

* [Bug fortran/52332] Internal compiler error in in gfc_get_symbol_decl
  2012-02-21 23:09 [Bug fortran/52332] New: Internal compiler error in in gfc_get_symbol_decl fmartinez at gmv dot com
                   ` (4 preceding siblings ...)
  2015-10-02  4:04 ` lkrupp at gcc dot gnu.org
@ 2015-10-02  6:01 ` Joost.VandeVondele at mat dot ethz.ch
  2015-10-02  8:31 ` pault at gcc dot gnu.org
                   ` (2 subsequent siblings)
  8 siblings, 0 replies; 10+ messages in thread
From: Joost.VandeVondele at mat dot ethz.ch @ 2015-10-02  6:01 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=52332

Joost VandeVondele <Joost.VandeVondele at mat dot ethz.ch> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |lkrupp at gcc dot gnu.org

--- Comment #7 from Joost VandeVondele <Joost.VandeVondele at mat dot ethz.ch> ---
(In reply to lkrupp from comment #6)
> Author: lkrupp
> Propchange: trunk/gcc/testsuite/gfortran.dg/string_array_constructor_1.f90
>             ('svn:executable' added)
> 
> Propchange: trunk/gcc/testsuite/gfortran.dg/string_array_constructor_2.f90
>             ('svn:executable' added)

I guess this part should be reverted.


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

* [Bug fortran/52332] Internal compiler error in in gfc_get_symbol_decl
  2012-02-21 23:09 [Bug fortran/52332] New: Internal compiler error in in gfc_get_symbol_decl fmartinez at gmv dot com
                   ` (5 preceding siblings ...)
  2015-10-02  6:01 ` Joost.VandeVondele at mat dot ethz.ch
@ 2015-10-02  8:31 ` pault at gcc dot gnu.org
  2015-10-02  8:34 ` pault at gcc dot gnu.org
  2015-10-02  9:02 ` louis.krupp at zoho dot com
  8 siblings, 0 replies; 10+ messages in thread
From: pault at gcc dot gnu.org @ 2015-10-02  8:31 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=52332

Paul Thomas <pault at gcc dot gnu.org> changed:

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

--- Comment #8 from Paul Thomas <pault at gcc dot gnu.org> ---
Fixed on trunk.

Thanks for the report


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

* [Bug fortran/52332] Internal compiler error in in gfc_get_symbol_decl
  2012-02-21 23:09 [Bug fortran/52332] New: Internal compiler error in in gfc_get_symbol_decl fmartinez at gmv dot com
                   ` (6 preceding siblings ...)
  2015-10-02  8:31 ` pault at gcc dot gnu.org
@ 2015-10-02  8:34 ` pault at gcc dot gnu.org
  2015-10-02  9:02 ` louis.krupp at zoho dot com
  8 siblings, 0 replies; 10+ messages in thread
From: pault at gcc dot gnu.org @ 2015-10-02  8:34 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=52332

--- Comment #9 from Paul Thomas <pault at gcc dot gnu.org> ---
Louis,

Joost is correct about this - we do not set the testcases as executable. Could
you revert that, please?

Thanks

Paul


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

* [Bug fortran/52332] Internal compiler error in in gfc_get_symbol_decl
  2012-02-21 23:09 [Bug fortran/52332] New: Internal compiler error in in gfc_get_symbol_decl fmartinez at gmv dot com
                   ` (7 preceding siblings ...)
  2015-10-02  8:34 ` pault at gcc dot gnu.org
@ 2015-10-02  9:02 ` louis.krupp at zoho dot com
  8 siblings, 0 replies; 10+ messages in thread
From: louis.krupp at zoho dot com @ 2015-10-02  9:02 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=52332

--- Comment #10 from louis.krupp at zoho dot com ---
Paul,

Fixed in revision 228376.

svn must have noticed that the two test files were executable.  I'm not 100%
sure how they got that way;  in at least one bug report, pr 52332, the
downloaded test cases are executable, and as I was trimming those files down to
what eventually became test cases, vi preserved those mode bits.

Does "make check-" try to run executable test files as though they were
scripts?  If not, then I'm not sure how it matters if they're executable or
not, although I'll admit that the svn:executable property is on the untidy
side.  I can see the merits of keeping things tidy as a matter of general
principle.

Anyway, that's fixed, and I've made sure that the one test file I haven't
resubmitted isn't executable.

Louis

---- On Fri, 02 Oct 2015 01:34:11 -0700 pault at gcc dot
gnu.org<gcc-bugzilla@gcc.gnu.org> wrote ---- 
 > https://gcc.gnu.org/bugzilla/show_bug.cgi?id=52332 
 >  
 > --- Comment #9 from Paul Thomas <pault at gcc dot gnu.org> --- 
 > Louis, 
 >  
 > Joost is correct about this - we do not set the testcases as executable.
Could 
 > you revert that, please? 
 >  
 > Thanks 
 >  
 > Paul 
 >  
 > --  
 > You are receiving this mail because: 
 > You are on the CC list for the bug. 
 >


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

end of thread, other threads:[~2015-10-02  9:02 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-02-21 23:09 [Bug fortran/52332] New: Internal compiler error in in gfc_get_symbol_decl fmartinez at gmv dot com
2012-02-21 23:47 ` [Bug fortran/52332] " burnus at gcc dot gnu.org
2013-06-10 22:07 ` dominiq at lps dot ens.fr
2015-09-10  9:52 ` dominiq at lps dot ens.fr
2015-09-10  9:54 ` dominiq at lps dot ens.fr
2015-10-02  4:04 ` lkrupp at gcc dot gnu.org
2015-10-02  6:01 ` Joost.VandeVondele at mat dot ethz.ch
2015-10-02  8:31 ` pault at gcc dot gnu.org
2015-10-02  8:34 ` pault at gcc dot gnu.org
2015-10-02  9:02 ` louis.krupp at zoho dot com

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).