public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug fortran/100110] New: Parameterized Derived Types, problems with global variable
@ 2021-04-16  5:37 xiao.liu@compiler-dev.com
  2021-04-19 10:41 ` [Bug fortran/100110] " pault at gcc dot gnu.org
                   ` (7 more replies)
  0 siblings, 8 replies; 9+ messages in thread
From: xiao.liu@compiler-dev.com @ 2021-04-16  5:37 UTC (permalink / raw)
  To: gcc-bugs

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

            Bug ID: 100110
           Summary: Parameterized Derived Types, problems with global
                    variable
           Product: gcc
           Version: 10.1.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: fortran
          Assignee: unassigned at gcc dot gnu.org
          Reporter: xiao.liu@compiler-dev.com
  Target Milestone: ---

the test case is,

program p
  implicit none
  type t(n)
    integer, len :: n
    integer :: arr(n, n)
  end type

  type(t(2)) :: obj
  print *, obj%n
  print *, shape(obj%arr)
  call test()
contains
  subroutine test()
    print *, obj%n
    print *, shape(obj%arr)
  end subroutine
end program

expected result is
           2
           2           2
           2
           2           2
but is
           0
           0           0
           0
           0           0

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

end of thread, other threads:[~2021-09-11  6:42 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-04-16  5:37 [Bug fortran/100110] New: Parameterized Derived Types, problems with global variable xiao.liu@compiler-dev.com
2021-04-19 10:41 ` [Bug fortran/100110] " pault at gcc dot gnu.org
2021-04-19 12:31 ` pault at gcc dot gnu.org
2021-04-20  6:31 ` cvs-commit at gcc dot gnu.org
2021-05-04 12:32 ` rguenth at gcc dot gnu.org
2021-09-10 19:40 ` cvs-commit at gcc dot gnu.org
2021-09-10 19:44 ` cvs-commit at gcc dot gnu.org
2021-09-10 19:46 ` anlauf at gcc dot gnu.org
2021-09-11  6:42 ` pinskia 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).