public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug fortran/64925] New: ICE with same names for dummy arg and internal procedure
@ 2015-02-03 18:31 longb at cray dot com
  2015-02-03 20:10 ` [Bug fortran/64925] " kargl at gcc dot gnu.org
                   ` (4 more replies)
  0 siblings, 5 replies; 6+ messages in thread
From: longb at cray dot com @ 2015-02-03 18:31 UTC (permalink / raw)
  To: gcc-bugs

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

            Bug ID: 64925
           Summary: ICE with same names for dummy arg and internal
                    procedure
           Product: gcc
           Version: 4.9.2
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: fortran
          Assignee: unassigned at gcc dot gnu.org
          Reporter: longb at cray dot com

> cat test.f90
subroutine foo(nnn, aaa, bbb, ccc)
  implicit none
  integer :: nnn, aaa, bbb(nnn)
  integer :: i
  do i=1,nnn
     aaa = aaa + bbb(ccc(i))
  end do
contains
  integer function ccc(i)
    implicit none
    integer :: i
    ccc = i
  end function ccc
end subroutine foo
> gfortran -c test.f90
test.f90: In function 'foo':
test.f90:1:0: internal compiler error: Segmentation fault
 subroutine foo(nnn, aaa, bbb, ccc)
 ^
0x99c48f crash_signal
    ../../cray-gcc-4.9.2/gcc/toplev.c:337
0x687b03 create_function_arglist
    ../../cray-gcc-4.9.2/gcc/fortran/trans-decl.c:2142
0x68af6b gfc_create_function_decl(gfc_namespace*, bool)
    ../../cray-gcc-4.9.2/gcc/fortran/trans-decl.c:2585
0x68f689 gfc_generate_contained_functions
    ../../cray-gcc-4.9.2/gcc/fortran/trans-decl.c:4762
0x68f689 gfc_generate_function_code(gfc_namespace*)
    ../../cray-gcc-4.9.2/gcc/fortran/trans-decl.c:5589
0x62efe0 translate_all_program_units
    ../../cray-gcc-4.9.2/gcc/fortran/parse.c:4953
0x62efe0 gfc_parse_file()
    ../../cray-gcc-4.9.2/gcc/fortran/parse.c:5150
0x66c105 gfc_be_parse_file
    ../../cray-gcc-4.9.2/gcc/fortran/f95-lang.c:212
Please submit a full bug report,
with preprocessed source if appropriate.
Please include the complete backtrace with any bug report.
See <http://gcc.gnu.org/bugs.html> for instructions.


Expected: Error message saying that a dummy argument and an internal procedure
cannot have the same name in a scoping unit. (Both are class 1 local
identifiers in subclause 16.3.1.)


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

end of thread, other threads:[~2015-05-19 17:02 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-02-03 18:31 [Bug fortran/64925] New: ICE with same names for dummy arg and internal procedure longb at cray dot com
2015-02-03 20:10 ` [Bug fortran/64925] " kargl at gcc dot gnu.org
2015-02-03 20:47 ` longb at cray dot com
2015-05-18 19:26 ` kargl at gcc dot gnu.org
2015-05-19 17:02 ` kargl at gcc dot gnu.org
2015-05-19 17:02 ` kargl 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).